3

我的应用程序中有一个材料垂直步进器,它显示在引导模式中。我在 mat-vertical-stepper 中使用 (selectionChange) 指令来跟踪 onchange 事件。但它最初不会被触发。我的步进数据是动态的,步骤是根据 db 值列出的。我需要在垫子步进器加载时执行一个函数,这需要执行一次。请提供任何帮助。

<mat-vertical-stepper [linear]="true" fxLayout="column" fxFlex="100" fxLayoutAlign="stretch" #stepper [selectedIndex]="selectedIndex" (selectionChange)="loadPattern($event)">
     <mat-step *ngFor="let template of TemplateArray; let i = index" fxFlex="100"  fxLayout="column">
          <ng-template matStepLabel>Pattern {{i + 1}}  </ng-template>
     </mat-step>
  </mat-vertical-stepper>
4

0 回答 0