Skip to content

animation skips straight to final state on production build (when using booleans for state) #20374

Closed

Description

@fxck

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

It works fine on stackblitz https://stackblitz.com/edit/burger?file=app%2Fburger%2Fburger.component.ts as well as with ng serve --aot, but doesn't work when built with ng build --prod http://burger.fxck.cz/

Minimal reproduction of the problem with instructions

works (dev): https://stackblitz.com/edit/burger?file=app%2Fburger%2Fburger.component.ts
doesn't (prod): http://burger.fxck.cz

What is the motivation / use case for changing the behavior?

Environment


Angular version: 5.0.1


Browser:
All
 
For Tooling issues:
- Node version: all   
- Platform:   all

Others:

cc @matsko

Activity

  1. fxck commented on Nov 13, 2017

    @fxck
    Author

    @matsko I managed to pin it down I think.

    The problem is certainly not with me using a function to return the trigger, nor with params being passed down by the function. In fact this simple animation:

      animations: [
        trigger('line', [
          state('true', style({
            width: '40px'
          })),
          state('false', style({
            width: '20px'
          })),
          transition('true <=> false', [
            animate('500ms')
          ])
        ])
      ]

    is not going to work either, but this will

      animations: [
        trigger('line', [
          state('opened', style({
            width: '40px'
          })),
          state('closed', style({
            width: '20px'
          })),
          transition('opened <=> closed', [
            animate('500ms')
          ])
        ])
      ]

    so the problem is obviously with using boolean, but curiously enough ONLY in production build, so something (likely the transition, since the final state is actually applied) is perhaps being removed while it shouldn't.

  2. changed the title [-]animation skips straight to final state on production build[/-] [+]animation skips straight to final state on production build (when using booleans)[/+] on Nov 13, 2017
  3. changed the title [-]animation skips straight to final state on production build (when using booleans)[/-] [+]animation skips straight to final state on production build (when using booleans for state)[/+] on Nov 13, 2017
  4. added
    area: animations
    on Nov 13, 2017
  5. added
    regression
    on Nov 21, 2017
  6. matsko commented on Nov 21, 2017

    @matsko
    Contributor

    Looking into it... Thank you @fxck.

  7. added a commit that references this issue on Dec 1, 2017
    afea001
  8. matsko commented on Dec 1, 2017

    @matsko
    Contributor

    @fxck just letting you know that the issue was detected and #20725 fixes it.

  9. matsko commented on Dec 1, 2017

    @matsko
    Contributor

    Thank you for making this issue easy to debug.

  10. added 2 commits that reference this issue on Dec 8, 2017
    69ed916
    661fdcd
  11. angular-automatic-lock-bot commented on Sep 12, 2019

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

  12. locked and limited conversation to collaborators on Sep 12, 2019
  13. added a commit that references this issue on Nov 20, 2026
    7885971
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: animationsfreq2: mediumregressiontype: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions