首页 > 解决方案 > 在标题中带有下一个按钮的角材料步进器

问题描述

我正在尝试使用下一步按钮以及步进器的标题来修改垫步进器。我当前的步骤如下所示:

  <mat-step  label="Details" state="details" fxFlex="100" [stepControl]="secondForm">
    <ng-container *ngTemplateOutlet="stepTwo"></ng-container>
  </mat-step>

  <mat-step  label="Options" state="options" fxFlex="100" [stepControl]="thirdForm">
    <ng-container *ngTemplateOutlet="stepThree"></ng-container>
  </mat-step>

  <mat-step label="Review" state="review" fxFlex="100"  editable="false">
    <ng-container *ngTemplateOutlet="stepFour"></ng-container>
  </mat-step>

  <mat-step >
      <ng-template matStepLabel>
          <p (click)="stepChange()"><mat-icon >{{nextIndexIcon}}</mat-icon>{{nextIndexName}}<mat-icon>arrow_forward_ios</mat-icon>Step {{stepnumber}}
          of 5</p>
      </ng-template>
      <ng-container *ngTemplateOutlet="stepFive"></ng-container>
    </mat-step>

第四步被修改为像上面的下一步按钮一样。它正在按预期工作(几乎)..现在的问题是,我从最后一步开始的第二步没有表格,也没有任何验证。我想强制用户查看此步骤,即使它没有任何表单。目前它正在跳过这一步并进入最后一步。

标签: angularangular-material

解决方案


推荐阅读