1

I'm using the cdk stepper for building a new stepper but I can't find a way to attach an angular animation for the transition between steps. Can somebody help me?

I've tried this solution by replacing the variable current by the stepper.selectedIndex but it's not working as expected.

<app-custom-stepper #stepper>
   <cdk-step [@stepTransition]="stepper.selectedIndex === 0 ? 'current' : 'previous'
      ">
     <p>This is any content of "Step 1"</p>
   </cdk-step>
   <cdk-step  [@stepTransition]="stepper.selectedIndex === 1 ? 'current'
          : stepper.selectedIndex > 1
          ? 'previous'
          : 'next'
      ">
     <p>This is any content of "Step 2"</p>
   </cdk-step>
</app-custom-stepper>
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Drago
  • 58
  • 4

0 Answers0