If a component has a frequently updating data-bound property, using ChangeDetectionStrategy.______ might lead to unwanted behavior.

  • CheckAlways
  • CheckOnce
  • Default
  • OnPush
In Angular, Change Detection is the mechanism that automatically updates the view to reflect the model state. When a component uses ChangeDetectionStrategy.OnPush, it means that change detection is triggered only when the input properties of the component change or when an event is fired from the component itself. Using OnPush can lead to unwanted behavior if a data-bound property frequently updates outside of these triggers, as it may not be detected by Angular.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *