bootstrap4手风琴无法通过传递索引在ngFor内部工作

问题描述

我正在ngFor内使用bootstrap 4手风琴,我正在将index传递给data-target元素和id,ids有所不同,但是手风琴无法正常工作,因为它不适用于动态for循环,下面是代码,任何人都可以帮助我。预先感谢

<div class="accordion" id="accordionExample">
    <div class="card mb-2" *ngFor="let list of workOrderList; let i=index">
        <div class="card-header bg-white" id="heading0">
            <h6 class="mb-0">
                <a type="button" class="" data-toggle="collapse" data-target="#collapse0">
                <i class="fa fa-plus"></i> {{list?.awoNumber}}</a>
            </h6>
        </div>
        <div id="collapse0" class="collapse" aria-labelledby="heading0" aria-expanded="true" data-parent="#accordionExample">
            <div class="card-body">
            <p>HTML stands for HyperText MarkuP Language. HTML is the standard markuP Language for describing the
            structure of web pages.
                <a href="https://www.tutorialrepublic.com/html-tutorial/" target="_blank">Learn more.</a>
            </p>
            </div>
        </div>
    </div>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)