When we use Default Strategy this guys could trigger Change Detection(of course except input params):
BUT. When you switch to OnPush Strategy it's trigger only by events and does not work for timers and http.
So the questions is why it does not work for times and https or why it works for events.
OnPush
is defined this way.
It triggers change detection
|async
pipe receives a new event@Input()
was updated by change detection.ChangeDetectorRef::markForCheck
ChangeDetectionStrategy.Default
triggers change detection for every async callback called within Angulars zone (every DOM even listened to within the Angular application, every Observable event or completed Promise, setTimeout, ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With