使用ngx-bootstrap,如何在手风琴组标题中添加图标? 例如:
<accordion-group heading="<i class='fa fa-users'></i> Users">
This content is straight in the template.
</accordion-group>
答案 0 :(得分:9)
我认为可以这样做..
<accordion-group #group>
<span accordion-heading>
<i class='fa fa-users'></i> Users
</span>
This content is straight in the template.
</accordion-group>
答案 1 :(得分:0)
您可以使用以下方式设置字体真棒图标。
<accordion-group [isOpen]="false" #accGroup>
<button class="btn btn-light float-right">
<i class="fa" [ngClass]="{'fa-arrow-down': accGroup?.isOpen, 'fa-arrow-up': !accGroup?.isOpen}"></i>
</button>
</accordion-group>