I was trying to use this angular HTML
<mat-stepper #stepper>
<mat-step [stepControl]="gadsForm" [attr.errorMessage]="showStepperError ? firstStepError : null">
But regardless of showStepperError's value - the stepper always shows an error.
I was trying to use this angular HTML
<mat-stepper #stepper>
<mat-step [stepControl]="gadsForm" [attr.errorMessage]="showStepperError ? firstStepError : null">
But regardless of showStepperError's value - the stepper always shows an error.
Adding
[hasError]is the only thing that has worked for me:<mat-step [stepControl]="gadsForm" [errorMessage]="stepperErrorMessage" [hasError]="stepperErrorMessage !== ''">