0
私は、特定のトピックをクリックするとトグルする必要があり、関連する質問リストが現れるはずのシナリオがあります。折り畳み可能なアイテムの1つが表示されている私はアコーデオンを使いました。data-parent = "#accordion" not working
HTML:
<ul id="accordion">
<li ng-repeat="topics in oJdDetails.topics" class="topic-li" data-toggle="collapse" data-target="{{'#'+topics + $index}}" data-parent="#accordion" ng-click="fngetQList(topics,$index)">
<p class="topics-p"> {{topics}}</p>
<ul id="{{topics + $index}}" class="collapse topic-li">
<li ng-repeat="value in aQuestionList">{{value.quesList.quesListName}}</li>
</ul>
</li>
</ul>
はJavaScript:
$scope.fngetQList = function(topics, index) {
debugger;
$scope.displayQList = true;
$scope.sTopics = topics;
$scope.index = index;
getCandidateInterviewListService.fnGetQList(topics).then(function(response) {
$scope.aQuestionList = response;
console.log($scope.aQuestionList);
});
};
ここでのトピックは、応答として来ていると私は崩壊 の動的IDを作っていますが、ここでアコーディオンが機能していません。
特定のトピックをクリックすると、以前開いていた注文トピックは閉じず、問題は理解できません。
ご協力いただければ幸いです。