/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/autocomplete/autocomplete-require-selection/autocomplete-require-selection-example.html
20 строк
626 B
Michael Small
docs: convert auto/badge/btn/sheet/btntoggle/input to signals (#33492)
06 июл 2026, 10:27
Не верифицирован
06 июл 2026, 10:27
9edf12d
Код
Авторство
О чём код?
Control value: {{myControl.value || 'empty'}} <form class="example-form"> <mat-form-field class="example-full-width"> <mat-label>Number</mat-label> <input #input type="text" placeholder="Pick one" matInput [formControl]="myControl" [matAutocomplete]="auto" (input)="filter()" (focus)="filter()"> <mat-autocomplete requireSelection #auto="matAutocomplete"> @for (option of filteredOptions(); track option) { <mat-option [value]="option">{{option}}</mat-option> } </mat-autocomplete> </mat-form-field> </form>