$digest and $apply allow Angular to be aware of changes to the scope from outside events and update the view. $digest runs a digest cycle to check for changes to watched properties and update the view. $apply runs $digest and ensures that any changes from outside of Angular trigger a digest cycle to update the view.
$digest and $apply allow Angular to be aware of changes to the scope from outside events and update the view. $digest runs a digest cycle to check for changes to watched properties and update the view. $apply runs $digest and ensures that any changes from outside of Angular trigger a digest cycle to update the view.
$digest and $apply allow Angular to be aware of changes to the scope from outside events and update the view. $digest runs a digest cycle to check for changes to watched properties and update the view. $apply runs $digest and ensures that any changes from outside of Angular trigger a digest cycle to update the view.
ng-click Watchers call $digest watch prop_1 Have you watch prop_2 Gmeout handle 1meout changed? watch prop_3 onclick handle click Summary ² Digest Cycle does not get triggered automatically if events are unaware of Angular ² Solution: • Call $digest after your custom code • Wrap your custom code inside of $apply • Find Angular specific service that handles the same functionality, e.g., $timeout