/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/autocomplete/autocomplete-overview/autocomplete-overview-example.html
26 строк
824 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>State</mat-label> <input matInput aria-label="State" [matAutocomplete]="auto" [formControl]="stateCtrl"> <mat-autocomplete #auto="matAutocomplete"> @for (state of filteredStates | async; track state) { <mat-option [value]="state.name"> <img alt="" class="example-option-img" [src]="state.flag" height="25"> <span>{{state.name}}</span> | <small>Population: {{state.population}}</small> </mat-option> } </mat-autocomplete> </mat-form-field> <br> <mat-slide-toggle [checked]="stateCtrl.disabled" (change)="stateCtrl.disabled ? stateCtrl.enable() : stateCtrl.disable()"> Disable Input? </mat-slide-toggle> </form>