如何动态删除 ng-stepper 级别的错误?

问题描述 投票:0回答:1

我试图使用这个有角度的 HTML

<mat-stepper #stepper>
  <mat-step [stepControl]="gadsForm" [attr.errorMessage]="showStepperError ? firstStepError : null">

但是无论

showStepperError
的值如何 - 步进器总是显示错误。

angular angular-material angularjs-directive
1个回答
1
投票

errorMessage
是 mat-step 组件的输入属性,而不是属性

请更改

errorMessage
属性,如下所示:

<mat-step [stepControl]="gadsForm" [errorMessage]="showStepperError ? firstStepError : null">
© www.soinside.com 2019 - 2024. All rights reserved.