1

I want to change the "default" change detection strategy for all components in angular 7 app, and use "onpush" instead.

What should I do?

My solution is to go in every component and write this code:

@Component({
   ...,
   changeDetection: ChangeDetectionStrategy.OnPush
})

Is it a right way when you want to change changedetection strategy for entire application, or is there any other (better way) way?

Nika Kurashvili
  • 6,006
  • 8
  • 57
  • 123

0 Answers0