-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(animations): properly support boolean-based transitions and state changes #19279
Conversation
1667cd3
to
c809202
Compare
You can preview c809202 at https://pr19279-c809202.ngbuilds.io/. |
return value != null ? value.toString() : null; | ||
} | ||
function normalizeTriggerValue(value: any): any { | ||
return value != null ? value : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
value != null ? value : null
should be same as:
value == null ? null : value
which should be same as
value
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note "not strict" comparison. It will convert undefined
to null
as well. I.e.
if value is undefined -> null
if value is null -> null
else -> value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment.
@@ -65,16 +65,27 @@ function parseAnimationAlias(alias: string, errors: string[]): string|Transition | |||
} | |||
} | |||
|
|||
const TRUE_BOOLEAN_VALUES = new Set<string>(); | |||
TRUE_BOOLEAN_VALUES.add('true'); | |||
TRUE_BOOLEAN_VALUES.add('1'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is 1
as true? Usually everything which is not false
is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add documentation to the trigger
docs
c809202
to
f39d479
Compare
You can preview f39d479 at https://pr19279-f39d479.ngbuilds.io/. |
… changes Closes angular#9396 Closes angular#12337
f39d479
to
3295c6a
Compare
You can preview 3295c6a at https://pr19279-3295c6a.ngbuilds.io/. |
…nd state changes (angular#19279)" This reverts commit a8920eb.
@matsko This PR does not apply cleanly on 4.4.x. Can you create a 4.4.x PR with these changes? |
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. |
Closes #9396
Closes #12337