Using TypeScript in your AngularJS Controllers - Some getting started tips

10 September 2014

So at FireBootCampwe are using Typescript and I have to say its a little early to say I love it but everyone I respect form experience eon large projects like the Monaco and TFS use it! Here are some tips and code highlights of how we ended up implementing our controllers with Typescript

For more information on the typescript controllers we made the following changes to improve the typescript implementation:

1. Removed $scope out of the forms and controllers.
2. Removed the interface for ng.Iscope, to make less duplicated code
3. Used $inject for minificationsafety so we did not have duplicate declaration of injected modules at the bottom and also now we can add the changes easily to both as they are right next to the class declaration.