1 obj should be defined somewhere in JS not just HTML, if for no other reason than clarity, if you do this both fields work exactly as expected.
2a Use the array/$inject declaration syntax
2b Use a build process you fool, ng-min solves your minification woes. You should ALWAYS have a build process anyways.
3 I work on an extremely large/complex angular app with 500-2000 active bindings at any one time, and have NEVER run into any issues at all with the digest loop. It is always extremely fast, even on slow computers.
4 Dont be a dumbass
5 Repeat #4
Edit. There IS one downside to angular scopes, and that is the need to occasionally/rarely using $parent in ng-model to force it to look into an "outer" scope, but I've found that whenever I run into this issue, its usually because I didn't design something right.
"1 obj should be defined somewhere in JS not just HTML, if for no other reason than clarity, if you do this both fields work exactly as expected."
And everybody knows just how easy that would make the entire development process in a non-trivial app (you know, the one angular claims it helps develop)
"3 I work on an extremely large/complex angular app with 500-2000 active bindings at any one time, and have NEVER run into any issues at all with the digest loop. It is always extremely fast, even on slow computers."
The article said it's easy to exceed 2000. I did it too. Also I recommend setting breakpoints in functions and what how many times it is executed during a digest-repaint cycle. Such fun!
28
u/yelvert Nov 05 '14 edited Nov 05 '14
1 obj should be defined somewhere in JS not just HTML, if for no other reason than clarity, if you do this both fields work exactly as expected.
2a Use the array/$inject declaration syntax
2b Use a build process you fool, ng-min solves your minification woes. You should ALWAYS have a build process anyways.
3 I work on an extremely large/complex angular app with 500-2000 active bindings at any one time, and have NEVER run into any issues at all with the digest loop. It is always extremely fast, even on slow computers.
4 Dont be a dumbass
5 Repeat #4
Edit. There IS one downside to angular scopes, and that is the need to occasionally/rarely using $parent in ng-model to force it to look into an "outer" scope, but I've found that whenever I run into this issue, its usually because I didn't design something right.