Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

When does a component with ChangeDetectionStrategy.OnPush get checked?

  1. A On every change detection cycle
  2. B When an input reference changes, an event fires from it, or an async pipe emits
  3. C Only on initial render
  4. D Only when markForCheck is called
Answer

When an input reference changes, an event fires from it, or an async pipe emits

OnPush relies on reference changes, which is why mutating an array in place does not trigger an update but creating a new array does.

All Angular MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as