17 lines
554 B
HTML
17 lines
554 B
HTML
<mat-form-field>
|
|
<mat-label>{{ label }}</mat-label>
|
|
<input
|
|
matInput
|
|
[disabled]="disabled"
|
|
[errorStateMatcher]="matcher"
|
|
(focusout)="onFocusOut()"
|
|
(input)="onInput($event)"
|
|
[required]="required"
|
|
[type]="type"
|
|
[value]="value"
|
|
/>
|
|
<mat-icon matSuffix (click)="onVisibilityClick($event)">{{ icon }}</mat-icon>
|
|
<mat-error *ngIf="ngControl.hasError('required')">{{ label }} is a required field.</mat-error>
|
|
<mat-error *ngIf="ngControl.hasError(customErrorName)">{{ customErrorMessage }}</mat-error>
|
|
</mat-form-field>
|