在角飞镖材料步进器中隐藏一个步骤

时间:2019-10-09 08:34:35

标签: dart angular-dart angular-material-stepper

我正在尝试根据特定条件隐藏步骤: 我正在做类似的事情:

<material-stepper legalJumps="none"
                          orientation="vertical"
                          [noText]="cancelString">


            <template step [name]="functionName" (continue)="onContinueStep1($event)"
                      [canContinue]="valid" [cancelHidden]="false">
                <div>

                </div>
            </template>
            <template step [name]="step2Label" (continue)="onContinueStep2($event)">
                <div>
                </div>
            </template>
            <template *ngIf="showStep3">
              <template step [name]="step3Label" (continue)="onClose()">
                <div>

                </div>
              </template>
            </template>
 </material-stepper>

但是,如果我添加模板“ <template *ngIf="showStep3">”,则会收到警告:内容与周围组件的任何换位选择器都不匹配。.

有任何提示吗?

更新1: 问题是ngIf语法,在模板中我们不能使用*,但是:<template [ngIf]="showStep3">

0 个答案:

没有答案
相关问题