Angular · Middle · Question 1 of 75
What changes when a component uses ChangeDetectionStrategy.OnPush?
- ✓Correct answer: Angular checks it only when it is marked dirty: an input reference changes, it or a child handles an event, a read signal changes, or
asyncdelivers a value - 2The component is never checked again after the first render
- 3The component is checked on every browser animation frame
Explanation
With the default strategy every component is checked on each change detection run. OnPush skips whole subtrees that were not marked, which is the main runtime optimization in zone-based apps.