Skip to content

@defer: placeholder and loading blocks are not removed by BaseAnimationRenderer (TransitionAnimationEngine) #51970

@elgreco247

Description

@elgreco247

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

animations

Is this a regression?

No

Description

The defer control flow blocks @placeholder and @loading are not removed when the animation providers are loaded (via provideAnimations()).

The problem seems to be in the TransitionAnimationEngine, which is called by the BaseAnimationRenderer when a node removal is requested:

const hostNS = this.namespacesByHostElement.get(element);

The host element namespace is undefined and thus the node is not removed.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-s7jtnu?file=src%2Fapp%2Fapp.component.ts

Please provide the exception or error you saw

see above

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

Angular CLI: 17.0.0-next.6
Node: 18.18.0
Package Manager: npm 9.4.2
OS: linux x64

Angular: 17.0.0-next.6
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-next.6
@angular-devkit/build-angular   17.0.0-next.6
@angular-devkit/core            17.0.0-next.6
@angular-devkit/schematics      17.0.0-next.6
@schematics/angular             17.0.0-next.6
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area: coreIssues related to the framework runtimecore: deferIssues related to @defer blocks.state: has PR

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions