首页 > 解决方案 > PrimeNG 芯片:removeIconClass 不起作用,并且不允许我替换默认 ICON,即 pi pi-times-circle

问题描述

我对 Prime NG 比较陌生,并且仍在尝试弄清楚一些事情。我被困在一个地方,我想使用文档中提到的属性removeIconClass更改 Prime NG 芯片的默认删除图标。但它不起作用,而是继续显示默认图标。以下是我尝试过的两种方法以及与其中一种相关的错误。如果 primeNG 团队的某个人告诉我我在这里做错了什么,那真的会很有帮助?

<p-chip *ngFor="let req of requirements" label="{{req.name}}" removeIconClass="pi pi-times" (onRemove)="onRemove(req.id)" [removable]="true"
            styleClass="chip-tag ntg-bg-white-bg ntg-body3 p-m-1 p-py-1 p-px-3"></p-chip>



<p-chip *ngFor="let req of requirements" label="{{req.name}}" [removeIconClass]="pi pi-times" (onRemove)="onRemove(req.id)" [removable]="true"
            styleClass="chip-tag ntg-bg-white-bg ntg-body3 p-m-1 p-py-1 p-px-3"></p-chip>

在此处输入图像描述

标签: angulartypescriptprimeng

解决方案


推荐阅读