Sunday, 11 August 2013

Using RequireJS with TypeScript and AngularJS

Using RequireJS with TypeScript and AngularJS

I'm about to rip my brains out trying to define an Angular module in
TypeScript while using RequireJS. Have looked all over for a solution
while spending days trying to figure it all out to no avail. Please help,
I'm so confused!
I'm not using Visual Studio, but rather WebStorm. This shouldn't really
matter however. I'm using TS 9.1, AngularJS 1.0.7, RequireJS 2.1.8. I've
also tried using DefinitelyTyped's angular.d.td, but it's not helping.
Does anyone have a simple example of a TS angular app module for app init,
with another TS angular module that has a controller, being loaded with
RequireJS, referencing "DefinitelyTyped/angularjs/angular.d.ts", and
calling 'angular.module' to define themselves, and then referencing the
controller in a web page?
Please, help.... I'm burning in TypeScript, RequireJS, AngularJS module hell.

1 comment: