gpt4 book ai didi

angular - 将 Chevron 图标添加到 ngx-bootstrap Accordion

转载 作者:太空狗 更新时间:2023-10-29 17:56:34 26 4
gpt4 key购买 nike

单击 Accordion 时,我无法将人字形从 UP 更改为 DOWN。无论我尝试什么技巧,甚至尝试像这样的其他示例,它似乎总是结果为真 https://stackblitz.com/edit/ngx-bootstrap-ifmpph?file=app%2Fapp.component.html

        <accordion [closeOthers]="true">
<accordion-group #group [isOpen]='true'>
<div accordion-heading class="clearfix">
Basic Information
<span class="badge badge-secondary float-right pull-right">
<i class="fa" [ngClass]="!group?.isOpen ? 'fa-chevron-down': 'fa-chevron-down'"></i>
</span>
</div>
</accordion-group>
</accordion>

最佳答案

这个有效:

  <accordion>
<accordion-group #group1 [isOpen]='true'>
<div accordion-heading class="clearfix">
Basic Information
<span class="badge badge-secondary float-right pull-right">
<i class="fa" [ngClass]="{'fa-chevron-up': group1.isOpen, 'fa-chevron-down': !group1.isOpen}"></i>
</span>
</div>
</accordion>

关于angular - 将 Chevron 图标添加到 ngx-bootstrap Accordion ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48776307/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com