Mistakes:
Do any of the following sound familiar?
* It’s hard to debug your view, because you have no idea where that Scope member is coming from
* When you inspect a Scope, you double-take because you thought it was the window object
* You at some point needed to access a child Scope member from a parent Scope, so you either either a) used $broadcast/$on to call it, or b) just moved the member into the parent Scope
* It’s unclear what is happening after any given user action, because there are umpteen-hundred events being emitted or broadcast
* There’s at least one service that is 1,000 lines long and is full of just random settings
* You either have one entry point into $http, or $http calls are scattered about controllers
These are all mistakes, and they are easy mistakes to make. The solution to all of these problems is the same: refactor.
Your new post is loading...
by the same author:
13 Steps to AngularJS Modularization:
http://blog.safaribooksonline.com/2014/03/27/13-step-guide-angularjs-modularization/
Writing Tests and Stomping Bugs in AngularJS:
http://blog.safaribooksonline.com/2014/04/01/writing-tests-stomping-bugs-angularjs/