--

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 the AsyncPipe does not trigger change detection, so we would need to manually call detectChanges() for each new event that is emitted from the observable.

Example that does not work with change detection OnPush

--

--

Rakia Ben Sassi

Google Developer Expert in Angular, WTM Ambassador, a seasoned software engineer, Content Creator | YouTube: https://www.youtube.com/@tekforge