當手風琴打開時,我試圖觸發一個事件。事件應該在手風琴開啓時觸發,而不是在關閉時觸發。打開uib-accordion時的觸發事件
HTML:
<uib-accordion>
<uib-accordion-group is-open="status.open" ng-click="showList(status.open)"
ng-init="count=0">
<uib-accordion-heading>
I can have markup, too! <i class="pull-right glyphicon"
ng-class="{'glyphicon-chevron-down': status.open,
'glyphicon-chevron-right': !status.open}"></i>
</uib-accordion-heading>
{{count}}
</uib-accordion-group>
</uib-accordion>
App.js(控制器內)
$scope.showList = function (status){
if(status)
{
$scope.count = $scope.count + 1;
}
};
爲了簡單起見,只事件遞增count
由一個。我只想知道如何在手風琴開啓時觸發事件。