What is change detection in Angular?
Change detection in Angular is a mechanism that tracks data changes in the application and automatically updates the user interface.
How it works:
- Angular checks the values of component properties and binds them to the template.
- If the data has changed, Angular re-renders only the parts of the template where it is used.
- The mechanism responds to events, asynchronous operations, and changes through
zone.js.
Conclusion: change detection lets the interface always stay synchronized with the state of the data without manually updating the DOM.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.