Skip to content

BUG - new animations API problem with binding multiple values as string #63365

@kukjevov

Description

@kukjevov

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

core

Is this a regression?

No

Description

New animations API supports this

<div animate.leave="css-class1 css-class2"></div>

and also this

<div [animate.leave]="['css-class1', 'css-class2']"></div>

but not this

<div [animate.leave]="'css-class1 css-class2'"></div>

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Failed to execute 'add' on 'DOMTokenList': The token provided ('css-class1 css-class2') contains HTML space characters, which are not valid in tokens.

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

Angular CLI: 20.2.0
Node: 22.16.0
Package Manager: npm 10.9.2
OS: Windows 11

Angular: 20.2.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimecore: animationsIssues related to `animate.enter` and `animate.leave`state: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions