Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): render hooks should not specifically run outside the Angul…
…ar zone (#55399) The timing of render hook execution is almost entirely identical to `ngZone.onMicrotaskEmpty`. Developers working towards zoneless compatibility will need to migrate `onMicrotaskEmpty` calls to use `afterNextRender`/`afterRender` instead. This, however, would lead to confusing issues if there are promises in the callbacks because `onMicrotaskEmpty` emits inside the Angular zone while render hooks execute outside today. This is problematic because it's not documented and does not produce any notification or error message when async work is done inside the hooks that requires change detection. Instead, change detection simply does not run, and this behavior has proven to be surprising to developers who are used to ZoneJS change detection behavior. fixes #55299 PR Close #55399
- Loading branch information