模态内部的Bootstrap手风琴仅在第一次工作

时间:2017-02-13 04:59:28

标签: javascript angularjs twitter-bootstrap bootstrap-modal bootstrap-accordion

我在角度ng-repeat内有一个带有手风琴(面板组)的自举模态窗口,请参阅下面的代码。在我第一次打开模态后,一切正常,但是如果我关闭模态,下次手风琴就会停止工作。请帮忙......

感谢。

<div class="modal-body">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default" ng-repeat="p in persons">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#{{p.Id}}">
                                <strong>Name:</strong> {{p.Name}}
                                <strong>Birthdate:</strong> {{p.BirthDate}}
                                <strong>Sex:</strong> {{p.Sex}}
                            </a>
                        </h4>
                    </div>
                    <div id="{{p.Id}}" class="panel-collapse collapse" ng-repeat="o in p.Orders">
                        <div class="panel-body">
                            <div class="col-sm-8">
                                <strong>Date:</strong> {{o.Date | date:'MM/dd/yyyy'}}<br />
                                <strong>Description:</strong> {{o.Description}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

0 个答案:

没有答案