How to Use Change Detection in Angular

Change Detection means updating the DOM whenever data is changed. Angular provides two strategies for Change Detection.
In its default strategy, whenever any data is mutated or changed, Angular will run the change detector to update the DOM. In the onPush strategy, Angular will only run the change detector  when a new reference is passed to @Input() data.