-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
animation skips straight to final state on production build (when using booleans for state) #20374
Comments
@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 |
Looking into it... Thank you @fxck. |
…nstructor For some reason, prior to this fix, the boolean set matching code (within `animation_transition_expr.ts`) failed to remain the same when compiled with closure. This refactor makes sure that the code stays in tact. Reproduction Details: Passes without `ng build --prod`: https://burger.stackblitz.io/ Fails with `ng build --prod`: http://burger.fxck.cz/ Closes angular#20374
Thank you for making this issue easy to debug. |
…nstructor (#20725) For some reason, prior to this fix, the boolean set matching code (within `animation_transition_expr.ts`) failed to remain the same when compiled with closure. This refactor makes sure that the code stays in tact. Reproduction Details: Passes without `ng build --prod`: https://burger.stackblitz.io/ Fails with `ng build --prod`: http://burger.fxck.cz/ Closes #20374 PR Close #20725
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
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 withng 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
cc @matsko
The text was updated successfully, but these errors were encountered: