You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOM elements are not removed when the root view is removed #39955
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationslegacy animations package only. Otherwise use area: core.core: DOM renderingmemory leakIssue related to a memory leakstate: has PR
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.
⚠️ This happens only when the BrowserAnimationsModule is imported, this doesn't happen with BrowserModule.
🔬 Minimal Reproduction
$ git clone [email protected]: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
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: animationslegacy animations package only. Otherwise use area: core.core: DOM renderingmemory leakIssue related to a memory leakstate: has PR
Activity
arturovt commentedon Mar 2, 2021
Fixed by #41001
zarend commentedon Mar 2, 2021
Reverting this in #41056
arturovt commentedon Apr 2, 2021
Fixed by #41059
angular-automatic-lock-bot commentedon May 3, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.