Skip to content

Animations: animateChild() not working correctly #18305

@MichaelPolster

Description

@MichaelPolster

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

This bug war not present in Angular 4.2.0-rc.1. But it appears with any newer version.
Test setup contains two components. The parent component is created and destroyed by *ngIf. The inner child component has an angular animation assigned to it. If the components are created, the inner one plays its animation -> OK.
If the outer component is destroyed it disappears before the inner component can finish it's animation, so you can't see the childs fade out animation -> NOK. AnimateChild() on the outer component should make this work but it doesn't.

Expected behavior

Finished animation of child component before destroying of the parent component.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/E3srjH?p=preview

What is the motivation / use case for changing the behavior?

Environment


Angular version: 4.2.0 and newer

Browser:
- [x] Chrome (desktop) version 59
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 54
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  Windows

Others:

Metadata

Metadata

Assignees

Labels

area: animationslegacy animations package only. Otherwise use area: core.regressionIndicates than the issue relates to something that worked in a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions