1

我正在使用cdk步进器来构建新的步进器,但我找不到为步骤之间的过渡附加角度动画的方法。有人可以帮助我吗?

我已经通过用 替换变量来尝试这个解决方案,但它没有按预期工作。currentstepper.selectedIndex

<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>
4

0 回答 0