Explain Angular Change Detection Strategies (Default vs OnPush).

Senior Angular

Answer

Default Strategy: Angular runs change detection for the entire component tree whenever any async event occurs. Simple but expensive for large apps.

OnPush Strategy: Angular checks the component only when its input reference changes, an observable emits, or an event originates from the component. This dramatically improves performance.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice