角形验证焦点Mat芯片

时间:2019-02-08 09:21:10

标签: typescript button angular5

通过此链接,我们创建了Mat Chip格式,并且我还包括了Mat按钮以重置此'chip'表格值,但无法实现。

HTML

<mat-form-field class="demo-chip-list">
  <mat-chip-list #chipList>
    <mat-chip *ngFor="let keyword of keywords" [selectable]="selectable"
             [removable]="removable" (remove)="remove(keyword)">
      {{keyword}}
      <mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
    </mat-chip>
    <input placeholder="Keywords"
           [matChipInputFor]="chipList"
           [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
           [matChipInputAddOnBlur]="addOnBlur"
           (matChipInputTokenEnd)="add($event)" />
  </mat-chip-list>
</mat-form-field>
 <button color="warn" mat-button matTooltip="Clear / Cancel" (click)="reset()">
    <i class="fa fa-trash fa-2x" style="color:#0468af;"></i>
  </button>

0 个答案:

没有答案