【发布时间】:2015-12-10 13:07:41
【问题描述】:
我在我的项目中使用 bootstrap 手风琴。我为标题添加了加号/减号。单击功能应仅适用于手风琴组的标题。但在我的程序中,它正在申请整个手风琴小组。因此,如果我单击面板主体的任何部分,则该功能正在运行。怎么能改变呢?
我的js代码:
$scope.changeIcon = function (index) {
if($scope.plus[index]=='+ ') {
$scope.plus[index] = '- ';
}
else {
$scope.plus[index] = '+ ';
}
};
My HTML code:
<uib-accordion close-others="oneAtATime" class="accordion-data">
<uib-accordion-group heading="{{plus[$index]}}{{area.areaname}}" ng-repeat="area in areas track by area.areaname" ng-click="changeIcon($index)">
/* Some other stuff */
</uib-accordion-group>
</uib-accordion
【问题讨论】:
-
有人可以回答这个问题吗?提前致谢。
标签: javascript html angularjs twitter-bootstrap