-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationscore: DOM renderingmemory leakIssue related to a memory leakIssue related to a memory leakstate: has PR
Milestone
Description
🐞 bug report
Affected Package
The issue is caused by package @angular/animations (probably)
Is this a regression?
I cannot say
Description
All DOM elements remain when calling NgModuleRef.destroy(), but actually, all ngOnDestroy hooks are invoked, event listeners are removed, basically, all cleanups are done except removing nodes from DOM.
BrowserAnimationsModule is imported, this doesn't happen with BrowserModule.
🔬 Minimal Reproduction
$ git clone git@github.com:arturovt/ngmoduleref-destroy-issue.git
$ cd ngmoduleref-destroy-issue
$ yarn- Start dev server
yarn ng s - Go to
http://localhost:4200, open dev tools, click the "Destroy" button. Notice logs in the console - Notice that DOM elements are NOT removed
🌍 Your Environment
Angular Version:
Angular CLI: 11.0.3
Node: 12.20.0
OS: linux x64
Angular: 11.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1100.3
@angular-devkit/build-angular 0.1100.3
@angular-devkit/core 11.0.3
@angular-devkit/schematics 11.0.3
@schematics/angular 11.0.3
@schematics/update 0.1100.3
rxjs 6.6.3
typescript 4.0.5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationscore: DOM renderingmemory leakIssue related to a memory leakIssue related to a memory leakstate: has PR