fix(animations): ensure animations are disabled on the element containing the @.disabled flag (#18714)
Prior to fix this fix, @.disabled would only work to disable child animations. Now it will also disable animations for the element that has the @.disabled flag (which makes more sense). PR Close #18714
This commit is contained in:

committed by
Miško Hevery

parent
2159342038
commit
791c7efe29
@ -282,11 +282,12 @@ export interface AnimationStaggerMetadata extends AnimationMetadata {
|
||||
* <div [@myAnimationTrigger]="myStatusExp">...</div>
|
||||
* ```
|
||||
*
|
||||
* ## Disable Child Animations
|
||||
* ## Disable Animations
|
||||
* A special animation control binding called `@.disabled` can be placed on an element which will
|
||||
then disable animations for any inner animation triggers situated within the element.
|
||||
then disable animations for any inner animation triggers situated within the element as well as
|
||||
any animations on the element itself.
|
||||
*
|
||||
* When true, the `@.disabled` binding will prevent inner animations from rendering. The example
|
||||
* When true, the `@.disabled` binding will prevent all animations from rendering. The example
|
||||
below shows how to use this feature:
|
||||
*
|
||||
* ```ts
|
||||
@ -312,8 +313,8 @@ export interface AnimationStaggerMetadata extends AnimationMetadata {
|
||||
* The `@childAnimation` trigger will not animate because `@.disabled` prevents it from happening
|
||||
(when true).
|
||||
*
|
||||
* Note that `@.disbled` will only disable inner animations (any animations running on the same
|
||||
element will not be disabled).
|
||||
* Note that `@.disbled` will only disable all animations (this means any animations running on
|
||||
* the same element will also be disabled).
|
||||
*
|
||||
* ### Disabling Animations Application-wide
|
||||
* When an area of the template is set to have animations disabled, **all** inner components will
|
||||
|
Reference in New Issue
Block a user