Skip to content

REMOVE_STYLES_ON_COMPONENT_DESTROY breaks :leave animations #50791

@waterplea

Description

@waterplea

Which @angular/* package(s) are the source of the bug?

animations, platform-browser

Is this a regression?

No

Description

If you enable REMOVE_STYLES_ON_COMPONENT_DESTROY, it does not wait for :leave animations to finish, causing components to lose styles before they are gone from DOM.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-ktwdzy

Toggle a simple component with fade animation on/off using *ngComponentOutlet on the reproduction link, background disappears before component is gone.

Please provide the environment you discovered this bug in (run ng version)

Angular 16.1.1

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions