我试图使用这个有角度的 HTML
<mat-stepper #stepper>
<mat-step [stepControl]="gadsForm" [attr.errorMessage]="showStepperError ? firstStepError : null">
但是无论
showStepperError
的值如何 - 步进器总是显示错误。
errorMessage
是 mat-step 组件的输入属性,而不是属性
请更改
errorMessage
属性,如下所示:
<mat-step [stepControl]="gadsForm" [errorMessage]="showStepperError ? firstStepError : null">