Change Detection Strategy Fundamentals
Explain the difference between Default and OnPush change detection strategies and why OnPush is a key performance lever.
Angular's Default change detection strategy checks every component in the tree on every change detection cycle, which is simple and safe but wasteful: most components' data hasn't actually changed most of the time, yet Angular still re-evaluates their template bindings just in case. ChangeDetectionStrategy.OnPush is the single most impactful, broadly-applicable performance optimization in Angular's component model, and it's a near-guaranteed interview topic in any performance-focused discussion.
Default change detection is like a security guard who walks every single hallway in a large building every five minutes regardless of any actual activity; OnPush is like installing motion sensors that only alert the guard to check a specific hallway when something has actually triggered them.