Disable animation of mat-stepper while in transition
Asked Answered
S

1

14

Is there any way to disable animation of Angular material's mat-stepper control, when we are switching from one step to another ?

Sebrinasebum answered 2/8, 2018 at 14:5 Comment(0)
D
29

Angular animations can be disabled by setting the elements property @.disabled, see https://angular.io/api/animations/trigger#disable-animations

You can simply put [@.disabled] = "true" input to your mat-stepper

<mat-horizontal-stepper [@.disabled]="true" [linear]="isLinear" #stepper>
Delayedaction answered 11/8, 2018 at 13:6 Comment(1)
This causes all inner child animations to be disabled too. As described in the same Angular docs page: "When @.disabled is true, it prevents the @childAnimation trigger from animating, along with any inner animations".Bidding

© 2022 - 2024 — McMap. All rights reserved.