Is there a way to postpone or delay a digest from happening?
I have a bunch of changes that I want to make to a model but I don't want the digest to fire until all changes to the model were made. Some of the objects on the model have watchers that update other objects on the model to change.
Ideally I'd like to
- Stop the $digest
- Make all changes to the model
- Start the $digest
The $digest will find all dirty objects and fire the watchers.
Another solution to this is to, instead of stopping $digest I could
- Remove the watchers
- Make all changes to the model (digest still runs)
- Add the watchers that were removed
After the watchers are added I'd need to run the watcher methods to ensure that the model is in the correct state.
I just feel the 2nd option seems like its a hack.
Ideas??