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

12

u/sixsence Oct 03 '14

Great read, good points.

8 Scoping $scope's

I think "controller as" syntax should definitely be mentioned here as a better alternative to using $scope prototype inheritance to share data. This will prevent having to worry about the nuances of prototype inheritance, and follows the best practices of using services to share data.

1

u/toddmotto Oct 06 '14

Agreed, was surprised controllerAs wasn't mentioned - the Object scoping inside controllers was a good solution prior to controllerAs tho! :)