midAngular
What is Angular OnPush Change Detection Strategy?
Updated Apr 28, 2026
Short answer
OnPush triggers change detection only when input references change or events occur.
Deep explanation
Unlike Default strategy, OnPush optimizes performance by skipping unnecessary checks. It only runs when input bindings change, events occur, or manual detection is triggered.
Real-world example
Large lists where UI updates only on data changes.
Common mistakes
- Mutating objects instead of creating new references.
Follow-up questions
- Why immutability important?
- How trigger manually?