Joined August 2014
·

Matt Duggan

Lead Front End Web Developer
Lead Front End Web Developer
·
Boston
·
·
·

You can use $digest if the $scope data being watched is on the current $scope or child $scopes. A $digest will trigger all the $$watchers down the tree, but won't propagate to sibling or parent $scopes. Use $apply if you want all $$watchers to trigger on the $scope tree.

Also, as noted above, $interval and $timeout trigger $apply, and there are definitely times where you'll want to use a timeout or interval function that isn't changing $scope data. Don't bog down your application by triggering unnecessary $$watches, - know when to use $timeout/$interval and setTimeout/setInterval.

Achievements
40 Karma
3,287 Total ProTip Views
Interests & Skills