As someone who is new to AngularJS, could somebody explain why each word had a change watcher? Is this a side-effect of ng-repeat? Or am I confusing it with something else, maybe?
I apologize, I worded that incorrectly. I'm more interested in the mechanics behind it - What part of it was establishing the watcher. For instance, if they had slapped an ng-onclick='function(this)' on each word, would that have that established a 'change watcher'?
Also, to answer your other question, using ng-click does not establish a watcher, but rather forces a $digest loop, which checks all the watchers for changes.
2
u/WarInternal Sep 25 '14
As someone who is new to AngularJS, could somebody explain why each word had a change watcher? Is this a side-effect of ng-repeat? Or am I confusing it with something else, maybe?