Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ivy - Animations animateChild not working #33597

Closed
TomTomB opened this issue Nov 5, 2019 · 1 comment
Closed

Ivy - Animations animateChild not working #33597

TomTomB opened this issue Nov 5, 2019 · 1 comment
Assignees
Labels
area: animations regression Indicates than the issue relates to something that worked in a previous version state: has PR type: bug/fix
Milestone

Comments

@TomTomB
Copy link

TomTomB commented Nov 5, 2019

🐞 bug report

Description

After enabling Ivy, Angular no longer waits for child components to animate before they get destroyed. To get this working before Ivy was via adding an animateChild animation to the parent component. Unfortunately this is not the case for Ivy.
A work arround is provided inside the reproduction repo below.

🔬 Minimal Reproduction

https://github.com/TomTomB/animation-ivy-issue

🌍 Your Environment

Angular Version:


Angular CLI: 9.0.0-rc.0
Node: 12.13.0
OS: win32 x64
Angular: 9.0.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.0
@angular-devkit/build-angular     0.900.0-rc.0
@angular-devkit/build-optimizer   0.900.0-rc.0
@angular-devkit/build-webpack     0.900.0-rc.0
@angular-devkit/core              9.0.0-rc.0
@angular-devkit/schematics        9.0.0-rc.0
@ngtools/webpack                  9.0.0-rc.0
@schematics/angular               9.0.0-rc.0
@schematics/update                0.900.0-rc.0
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2
@ngbot ngbot bot modified the milestone: needsTriage Nov 5, 2019
@kara kara modified the milestones: needsTriage, v9-candidates Nov 5, 2019
@matsko matsko added regression Indicates than the issue relates to something that worked in a previous version and removed severity3: broken labels Nov 5, 2019
@kara kara modified the milestones: v9-candidates, v9-blockers Dec 11, 2019
crisbeto added a commit to crisbeto/angular that referenced this issue Jan 8, 2020
…finish on destroy in ivy

Fixes the animations engine not waiting for `:leave` animations to finish when a child component host is destroyed with Ivy. The issue seems to come from the fact that when removing a host element we end up calling `removeNode` on the namespace twice which in turn calls `triggerLeaveAnimation`. The first time everything is correct and the animation triggers, but the second time we don't check whether the animation was started and we remove the element immediately. These changes add some code to check that the leave animation hasn't been started already.

Fixes angular#33597.
crisbeto added a commit to crisbeto/angular that referenced this issue Jan 9, 2020
…ving parent in Ivy

In angular#28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes angular#33597.
crisbeto added a commit to crisbeto/angular that referenced this issue Jan 9, 2020
…ving parent in Ivy

In angular#28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes angular#33597.
crisbeto added a commit to crisbeto/angular that referenced this issue Jan 9, 2020
…ving parent in Ivy

In angular#28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes angular#33597.
matsko pushed a commit that referenced this issue Jan 21, 2020
…ving parent in Ivy (#34702)

In #28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes #33597.

PR Close #34702
@matsko matsko closed this as completed in 697f6a5 Jan 21, 2020
sonukapoor pushed a commit to sonukapoor/angular that referenced this issue Feb 13, 2020
…ving parent in Ivy (angular#34702)

In angular#28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes angular#33597.

PR Close angular#34702
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.