How does AngularJS implement change detection under the hood?
Updated May 15, 2026
Short answer
AngularJS uses a digest cycle with dirty checking to detect model changes and update the view.
Deep explanation
Unlike modern frameworks using fine-grained reactivity, AngularJS relies on a digest cycle that iterates over all watchers registered on $scope. Each watcher compares previous and current values using dirty checking. If a change is detected, another digest cycle may be triggered until the system stabilizes. This recursive checking ensures consistency but can become expensive at scale due to O(n) watcher evaluation.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro