mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-12 03:21:37 +00:00
27 lines
870 B
HTML
Executable File
27 lines
870 B
HTML
Executable File
<mat-form-field class="example-chip-list">
|
|
<mat-chip-list #chipList>
|
|
<mat-chip
|
|
*ngFor="let fruit of fruits"
|
|
[selectable]="selectable"
|
|
[removable]="removable"
|
|
(removed)="remove(fruit)">
|
|
{{fruit}}
|
|
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
|
|
</mat-chip>
|
|
<input
|
|
placeholder="New fruit..."
|
|
#fruitInput
|
|
[formControl]="fruitCtrl"
|
|
[matAutocomplete]="auto"
|
|
[matChipInputFor]="chipList"
|
|
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
|
|
[matChipInputAddOnBlur]="addOnBlur"
|
|
(matChipInputTokenEnd)="add($event)">
|
|
</mat-chip-list>
|
|
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
|
|
<mat-option *ngFor="let fruit of filteredFruits | async" [value]="fruit">
|
|
{{fruit}}
|
|
</mat-option>
|
|
</mat-autocomplete>
|
|
</mat-form-field>
|