Skip to content

Instantly share code, notes, and snippets.

@CodingWithTashi
Created February 21, 2020 14:14
Show Gist options
  • Save CodingWithTashi/680e788028537d65d9862ba42fbd02c4 to your computer and use it in GitHub Desktop.
Save CodingWithTashi/680e788028537d65d9862ba42fbd02c4 to your computer and use it in GitHub Desktop.
<mat-form-field class="example-chip-list">
<mat-chip-list #chipList aria-label="Fruit selection">
<mat-chip *ngFor="let fruit of fruits" [selectable]="selectable"
[removable]="removable" (removed)="remove(fruit)">
{{fruit.name}}
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
</mat-chip>
<input placeholder="New fruit..."
[matChipInputFor]="chipList"
[matChipInputAddOnBlur]="addOnBlur"
(matChipInputTokenEnd)="add($event)">
</mat-chip-list>
</mat-form-field>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment