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
Animations: transition doesn't support true/false values when the trigger is a boolean #12337
Comments
This was working in Angular 2.4. |
I can also confirm that it is broken in 4.0.1. These do not work: animations: [
trigger('alertDisplayed', [
state('true', style({opacity: 1})),
state('false', style({opacity: 0, margin: 0, padding: '0 15px'})),
transition('true => false', animate('200ms')),
transition('false => true', animate('200ms'))
])
] animations: [
trigger('alertDisplayed', [
state('true', style({opacity: 1})),
state('false', style({opacity: 0, margin: 0, padding: '0 15px'})),
transition('1 => 0', animate('200ms')),
transition('0 => 1', animate('200ms'))
])
] This does work: animations: [
trigger('alertDisplayed', [
state('1', style({opacity: 1})),
state('0', style({opacity: 0, margin: 0, padding: '0 15px'})),
transition('1 => 0', animate('200ms')),
transition('0 => 1', animate('200ms'))
])
] |
This is kind of related: |
… changes Closes angular#9396 Closes angular#12337
… changes Closes angular#9396 Closes angular#12337
… changes Closes angular#9396 Closes angular#12337
… changes Closes angular#9396 Closes angular#12337
… changes Closes angular#9396 Closes angular#12337
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 ... (check one with "x")
Current behavior
When using animation on a component with a boolean trigger, setting a transition from 'false => true' won't do the transition. If you set it to '0 => 1' the transition will work fine.
Expected behavior
When using animation on a component with a boolean trigger, setting a transition from 'false => true' should do the specified transition.
Minimal reproduction of the problem with instructions
http://plnkr.co/edit/dVVesfq6TCiOclwxRSgf
What is the motivation / use case for changing the behavior?
Since state supports 'true' and 'false' values, for the sake of consistency transition should support them as well.
Please tell us about your environment:
macOS Sierra, NPM
node --version
= v6.3.0The text was updated successfully, but these errors were encountered: