Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
If any component has a (animate.leave) hook - Angular does not remove style tags from head during renderer destroy
Please see reproduction example, if you remove (animate.leave) hook from TestComponent - background color will change when components destroys.
I expect that Angular remove style tags after all leave animations ends.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-fiddle-gqwykbhz-xf3v3hkw?file=src%2Fapp%2Ftest.component.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version)
Any Angular 20.2+ version
Anything else?
No response
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
If any component has a
(animate.leave)hook - Angular does not remove style tags from head during renderer destroyPlease see reproduction example, if you remove (animate.leave) hook from
TestComponent- background color will change when components destroys.I expect that Angular remove style tags after all leave animations ends.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-fiddle-gqwykbhz-xf3v3hkw?file=src%2Fapp%2Ftest.component.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
No response