Skip to content

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

Closed

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

Activity

  1. added
    core: animations
    area: core
    on Aug 25, 2025
  2. added this to the needsTriage milestone on Aug 25, 2025
  3. thePunderWoman commented on Aug 25, 2025

    @thePunderWoman
    Contributor

    @kukjevov I can't replicate this with animate.enter, but I can with animate.leave. Can you confirm that this affects animate.enter?

  4. added a commit that references this issue on Aug 25, 2025
    d7b8e77
  5. kukjevov commented on Aug 25, 2025

    @kukjevov
    ContributorAuthor

    @thePunderWoman you are right, i tested this with leave and i assumed it will be same for enter.

    But as you said it is working for animate.enter correctly. Only animate.leave is affected.

  6. added a commit that references this issue on Aug 25, 2025
    c8f07da
  7. added a commit that references this issue on Aug 25, 2025
    9139fe0
  8. angular-automatic-lock-bot commented on Sep 25, 2025

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corecore: animationsstate: has PR

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions