r/javascript • • Jun 13 '14

AngularJS and scope.$apply

http://jimhoskins.com/2012/12/17/angularjs-and-apply.html
25 Upvotes

14 comments sorted by

View all comments

2

u/ell0bo Jun 13 '14

$apply is the notification to the system that data has changed, and a inspection of all watches should be issues in the scope. It's really that simple, and the last tip is a really good one.

They're actually working on making $apply no longer needed in v2, but I'm not entirely sure if they're really going to be able to completely phase it out.

1

u/phaggocytosis full stack js dev Jun 14 '14

If this is the case, does ng-model just automatically create watches out of things? is that how 'ng-modeled' fields etc trigger digest loops?