What is the main purpose of Angular's ChangeDetectionStrategy.OnPush?

  • To enable two-way data binding.
  • To improve change detection performance.
  • To disable change detection altogether.
  • To increase the framework's size.
The main purpose of Angular's ChangeDetectionStrategy.OnPush is to improve change detection performance. When you use this strategy, Angular will only perform change detection when input properties of a component change or when certain events are triggered, leading to better performance in applications with complex component trees. The other options are not the main purpose of this strategy.
Add your answer
Loading...

Leave a comment

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