Jan 1, 2021
Hi mariano,
That’s a good question. Here is an answer from Michael Hoffmann and another example that would not work without markForChech()
when we use change detection OnPush
:
… the
AsyncPipe
automatically works using OnPush change detection strategy. ... The implementation without theAsyncPipe
does not trigger change detection, so we would need to manually calldetectChanges()
for each new event that is emitted from the observable.