angular - 如何在引导主题项目中显示角材料芯片?
问题描述
根据上图,我在引导主题项目中显示垫芯片时遇到了问题。它仅在我单击或点击某些键后显示为完整的芯片。我已经在我的 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>
希望有人可以在这个问题上帮助我。非常感谢!
解决方案
我遇到了同样的问题。我认为使用引导芯片更容易。
推荐阅读
- python - 如何将初始数据放在 CreateView 中的表单上?
- python-3.x - Tensorflow 对象检测 API - 推理后如何读取 TFRecord?
- python - 输入到 CNN 的超像素
- c - 输入字符串由空终止字符组成
- slack - Slack conversations.list 方法没有列出所有频道
- firebase - 使用数据库时看不到 Firebase 的网络调用?
- java - 在 Java 中引用对象
- android - Kotlin CountDownTimer lateinit 属性尚未初始化且未找到 CoreComponentFactory
- elasticsearch - Elasticsearch,映射类型字符串不能包含启用的false 为什么?
- swift - UITABLE view sections with different prototype cells in each section