Visitar URL original
RouteReuseStrategy with components having animation bug in clearing/updating the NGFOR elements · Issue #45765 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20260527125759/https://github.com/angular/angular/issues/45765
Skip to content

RouteReuseStrategy with components having animation bug in clearing/updating the NGFOR elements #45765

@albanx

Description

@albanx

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

animations, core, router

Is this a regression?

Yes

Description

When reusing an component that has a list of elements that shows in a ngFor 4
The bug happens under this conditions:

  • RouteReuseStrategy on a component that shows a list of element
  • Having a fadeIn animation with enter target for the element of the list
  • when switching between the list component and another route (which kicks the store and the retrive of RouteReuseStrategy)

Minimal live example with bug replication:
https://stackblitz.com/edit/angular-8chhcg?file=src%2Fapp%2Fviews%2Fdetails%2Fdetails.component.html

replication steps

  • Go To Catalog Page
  • Click Search 1, Search 2, Search 3 button (works fine)
  • Go to Home or Login page (click the links)
  • Go back to Catalog Page, and click search 1 search 2 or search 3
  • You will see that clicking for example search 1 will show the list of search 1 and search 2 without removing the old list

This bug happens on Angular 13.4, but Does not happen on Angular 12.4

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-8chhcg?file=src%2Fapp%2Fviews%2Fdetails%2Fdetails.component.html

Please provide the exception or error you saw

No error on the console

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

Angular CLI: 13.2.5
Node: 16.13.0
Package Manager: npm 8.1.0
OS: darwin x64

Angular: 13.2.4
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, material, platform-browser
... router

Package                             Version
-------------------------------------------------------------
@angular-devkit/architect           0.1302.5
@angular-devkit/build-angular       13.2.5
@angular-devkit/core                13.2.5
@angular-devkit/schematics          13.2.5
@angular/cli                        13.2.5
@angular/platform-browser-dynamic   13.3.1
@angular/platform-server            13.3.1
@nguniversal/builders               13.1.0
@nguniversal/express-engine         13.1.0
@schematics/angular                 13.2.5
rxjs                                7.5.4
typescript                          4.4.3

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: animationslegacy animations package only. Otherwise use area: core.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions