Watcher module provides tool to disable and enable angular watchers.
Watchers
Pause Watchers
A static example of two elements
pause-watcher="false"
:
{{ controller.count }}
pause-watcher="true"
:
{{ controller.count }}
- HTML
<div ng-controller="PauseWatcherStaticExampleController as controller"> <inv-dialog id="pausedWatcherDialog1" dialog-type="content" dialog-title="'Watcher is not paused'" pause-watcher="false"> <dialog-content> <code>pause-watcher="false"</code>: <span>{{ controller.count }}</span> </dialog-content> <dialog-footer></dialog-footer> </inv-dialog> <hr /> <inv-dialog id="pausedWatcherDialog2" dialog-type="content" dialog-title="'Watcher is Paused'" pause-watcher="true"> <dialog-content> <code>pause-watcher="true"</code>: <span>{{ controller.count }}</span> </dialog-content> <dialog-footer> </dialog-footer> </inv-dialog> </div>