2
我試圖切換程序引導崩潰這是自舉崩潰如何切換從angularjs
<div class="panel-heading" role="tab" id="headingStores">
<h4 class="panel-title">
<span class="collapsed" id="StoresPanel" role="button" data-toggle="collapse" data-parent="#filter-field-container" href="#filterStores" aria-expanded="false" aria-controls="filterStores">
<i class="fa fa-chevron-circle-right"></i><i class="fa fa-chevron-circle-down"></i> Stores
<span ng-if="showStore" class="pull-right">{{countStore}}</span>
</span>
</h4>
</div>
我的角碼是
var domElement = document.getElementById('StoresPanel');
angular.element(domElement).collapse('show');
但倒塌(「秀」)未調用切換功能。請幫助!
你爲什麼使用'triggerHandler('click')'而不是'ng-click'? – CozyAzure
你已經標記了'angular-ui-bootstrap',你看過它嗎? http://angular-ui.github.io/bootstrap/#/collapse – Icycool
是的,我有。但是,再次使用ng-click,我只想從angularjs代碼切換(顯示和隱藏)。 – khurram