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

Problems with animations when viewContainerRef change Ivy Angular9 #38871

Closed
temaisgod opened this issue Sep 16, 2020 · 2 comments
Closed

Problems with animations when viewContainerRef change Ivy Angular9 #38871

temaisgod opened this issue Sep 16, 2020 · 2 comments

Comments

@temaisgod
Copy link

temaisgod commented Sep 16, 2020

🐞 Problems with animations when viewContainerRef change

Affected Package

@angular

Is this a regression?

works without ivy compilation in Angular v8.
actually not working with Angular 9.2 and ivy compilation.

Description

In a proyect with DinamicLoaderComponents with AdDirective, load a component in container that have a material-sidenav or angular-animations declarations, after deteach this view for save the componentRef to after restore in the same container .

When restore the view the sidenav Animation or animationAngular failed and block it, its necessary change the value of trigger to reset status animation.

🔬 Minimal Reproduction

In the stackblitz explample I use one class (ClientComponent) to instance two components with FactoryResolver, save the componentRef, deteach view in container and after restore in the container with .insert() (comment in code).

Reproduction:

  1. Load component 1 (click "Load Client 1" Button).
  2. Open sidenav and animation (click "TOOGLE SIDENAV" and animationText).
  3. With sidenav open and animation text visible change the view to client2 (click "Load Client 2" Button).
  4. Now restore view Client 1 (click "Load Client 1" Button).
    ERROR -> Failer animation and sidenav styles its necessary toogle sidenav or animation two times for to working.

Only failed with EnablyIvy option, if disable enableIvy in settings of stackblitz working fine.

https://stackblitz.com/edit/angular-9-bugsanimations?file=src/app/app.component.ts

NOTE:

if i remove alls animations decorators [@---] works too.

🔥 Exception or Error

The animations of angular not working correctly.

🌍 Your Environment

nodeJs v12

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.1.12
Node: 12.18.4
OS: win32 x64

Angular: 9.1.12
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.7
@angular-devkit/build-angular      0.900.7
@angular-devkit/build-optimizer    0.900.7
@angular-devkit/build-webpack      0.900.7
@angular-devkit/core               9.0.7
@angular-devkit/schematics         9.1.12
@angular/cdk                       9.2.4
@angular/language-service          9.0.7
@angular/material                  9.2.4
@angular/material-moment-adapter   9.2.4
@ngtools/webpack                   9.0.7
@schematics/angular                9.1.12
@schematics/update                 0.901.12
rxjs                               6.6.3
typescript                         3.7.5
webpack                            4.41.2
@jelbourn
Copy link
Member

Duplicate of #35270

@jelbourn jelbourn marked this as a duplicate of #35270 Oct 26, 2020
@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 Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants