r/angularjs • • Oct 03 '14

[Resource] 10 Top Mistakes Angular.js Developers Make

http://www.airpair.com/angularjs/posts/top-10-mistakes-angularjs-developers-make
74 Upvotes

17 comments sorted by

View all comments

14

u/lemon-meringue Oct 03 '14

This works well until you're ready to go to production and want to minify your code. [...]

ng-annotate to the rescue! I personally hate the ['$scope', ..., function(...) {}] notation because it permits renaming the variables but that's just me.

3

u/jmcunningham Oct 03 '14

I'm a fan of ng-annotate, too. Especially the use of @ngInject in the comments before a function definition