/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/select/select-custom-trigger/select-custom-trigger-example.html
16 строк
560 B
Kristiyan Kostadinov
docs(multiple): switch docs examples to new control flow
06 ноя 2023, 18:51
06 ноя 2023, 18:51
99b62ba
Код
Авторство
О чём код?
<mat-form-field> <mat-label>Toppings</mat-label> <mat-select [formControl]="toppings" multiple> <mat-select-trigger> {{toppings.value?.[0] || ''}} @if ((toppings.value?.length || 0) > 1) { <span class="example-additional-selection"> (+{{(toppings.value?.length || 0) - 1}} {{toppings.value?.length === 2 ? 'other' : 'others'}}) </span> } </mat-select-trigger> @for (topping of toppingList; track topping) { <mat-option [value]="topping">{{topping}}</mat-option> } </mat-select> </mat-form-field>