/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/input/input-errors/input-errors-example.html
12 строк
515 B
Kristiyan Kostadinov
docs(multiple): switch docs examples to new control flow
06 ноя 2023, 18:51
06 ноя 2023, 18:51
99b62ba
Код
Авторство
О чём код?
<form class="example-form"> <mat-form-field class="example-full-width"> <mat-label>Email</mat-label> <input type="email" matInput [formControl]="emailFormControl" placeholder="Ex. pat@example.com"> @if (emailFormControl.hasError('email') && !emailFormControl.hasError('required')) { <mat-error>Please enter a valid email address</mat-error> } @if (emailFormControl.hasError('required')) { <mat-error>Email is <strong>required</strong></mat-error> } </mat-form-field> </form>