Skip to content

Animations: transition between states broken when combined with query #28654

Closed

Description

@dirkluijk

🐞 bug report

Affected Package

The issue is caused by package @angular/animations

Is this a regression?

Not sure.

Description

state('state1', style({ /*...*/ })),
state('state2', style({ /*...*/ })),
transition('state1 <=> state2', [
  animate(500),
  query(/* ... */)
])

Does not work as expected. It does not transition to the states.

However, when swapping the animate() and query(), it does work:

state('state1', style({ /*...*/ })),
state('state2', style({ /*...*/ })),
transition('state1 <=> state2', [
  query(/* ... */),
  animate(500)
])

🔬 Minimal Reproduction

https://stackblitz.com/edit/animation-bug

🌍 Your Environment

Angular Version:

Angular 7

Anything else relevant?
See also: https://stackoverflow.com/questions/51726044/angular-transition-between-states-isnt-animated-correctly-if-animate-is-place/54631683#54631683

Activity

  1. added
    area: animations
    on Feb 12, 2019
  2. added this to the needsTriage milestone on Feb 12, 2019
  3. modified the milestones: needsTriage, Backlog on Apr 16, 2019
  4. added
    P3
    and removed on Oct 1, 2020
  5. shadyabouelmakarem commented on Dec 7, 2021

    @shadyabouelmakarem

    I'm facing the same issue and used the same mentioned workaround, any updates on any plan to fix this?

  6. added a commit that references this issue on Jan 7, 2022
    898b569
  7. added a commit that references this issue on Jan 13, 2022
    af0a152
  8. dario-piotrowicz commented on Jan 19, 2022

    @dario-piotrowicz
    Contributor
  9. angular-automatic-lock-bot commented on Feb 19, 2022

    @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.

  10. locked and limited conversation to collaborators on Feb 19, 2022
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

    P3area: animationsfreq2: mediumtype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions