Angular is a MVW framework. It helps us to bind the model and the view. In other words, when any change happens in the model, the view gets updated. This updation of the model and the view is done by a loop called as digest cycle.
Digest cycle follows four important steps:
- Step 1: Some kind of event is triggered by the end user like typing (
onchange
), button click, etc. and due to this activity model value changes. - Step 2: Angular first checks if the new value and old values are same. If they are the same, it does not do anything. If they are not, then it invokes the digest cycle.
- Step 3: Digest cycle then runs through the scope objects to check which objects are getting affected because of this change. Every object in the scope has watchers. Watchers as the name says listens to whether the model has changed or not. Digest cycle informs the watchers about the model change and then watchers synchronize the view with the model data.
- Step 4: In step 3, watchers update the view and due to that update, it's very much possible that the model changes again. Now due to this model change, we have to re-evaluate the view again. So the digest loop runs once again to ensure that all things are synched up. This second loop which runs is termed as dirty check loop.
Below is the figure wherein we have highlighted all the four steps.

So summarizing definitions for the above three concepts:
- Digest cycle: It is a simple loop which updates the model and view.
- Watchers: They are listeners which are attached to expression and angular directives and fire when the model data changes.
- Dirty check: This is a extra digest loop which runs to check any cascading left over updates due to the first digest cycle.