打开一个Bootstrap和Angularjs不工作的盒子

Open a box with Bootstrap and Angularjs not working

本文关键字:Angularjs 工作 盒子 Bootstrap 一个      更新时间:2023-09-26

我从AngularJS开始,我想知道为什么当我试图简单地打开这样的框时,Bootstrap和AngularJS之间会发生冲突:

链接:

<a class="btn btn-primary" role="button" data-toggle="collapse" href="#open-baggage-box" aria-expanded="false" aria-controls="open-baggage-box">Add Now</a>

方框:

    <div id="open-baggage-box" class="collapse add-price-section">
        <div class="open-holder">
            <div class="container">
            </div>
        </div>
    </div>

它实际上不起作用,我真的不知道为什么。感谢

由于角度模板通常是动态加载的,bootstrap可以在渲染之前查找塌陷元素。

如果你想在AngularJS中使用Bootstrap UI元素,我建议使用UI Bootstrap,它将它们实现为Angular指令。

在您的情况下,collapse指令将完成以下工作:(