根据上图,我在引导主题项目中显示垫芯片时遇到了问题。它仅在我单击或点击某些键后显示为完整的芯片。我已经在我的 module.ts 文件中安装了角材料并导入了垫芯片。mat芯片的代码如下:
<input id="intrest" placeholder="Enter Interest" #interestInput [formControl]="interestCtrl" list="interestList" [matChipInputFor]="chipList [matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur" (matChipInputTokenEnd)="addInterests($event)" autocomplete="off" (keypress)="intrestKeyPress($event)"/>
<mat-chip-list #chipList>
<mat-chip style="background-color:#0F52BA; color: white;" *ngFor="let interest of Interests" [selectable]="selectable" [removable]="removable" (removed)="removeInterests(interest)" [(ngModel)]="interest"> {{interest}}
<i class="fa fa-times" matChipRemove *ngIf="removable"></i>
</mat-chip>
</mat-chip-list>
希望有人可以在这个问题上帮助我。非常感谢!