Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(animations): cleanup DOM elements when the root view is removed (#…
…45143) Currently, when importing `BrowserAnimationsModule`, Angular provides `AnimationRendererFactory` as the `RendererFactory2`. The `AnimationRendererFactory` relies on the `AnimationEngine`. The `AnimationEngine` may be created earlier than the `ApplicationRef` (e.g. if it's requested within the `APP_INITIALIZER` before the `ApplicationRef` is created). This means that Angular will add the `AnimationEngine` to `R3Injector.onDestroy` before the `ApplicationRef`. The `R3Injector` will call `ngOnDestroy()` on the `AnimationEngine` before the `ApplicationRef`, which means the `flush()` will be called earlier before views are destroyed. PR Close #45108 PR Close #45143
- Loading branch information
Showing
3 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters