2015-08-26 68 views
0

我對Angular手風琴有一些問題。下面是HTML /角碼:Angular UI Accordion的問題

<accordion id="accordion1" close-others="true"> 
    <accordion-group heading="Static Header" is-open="false" ng-repeat="service in userPF.custom.services"> 
     <accordion-heading><input type="checkbox" name="status" disabled>On <input type="checkbox" name="status" disabled checked>Off {{service.name}} {{service.desc}}</accordion-heading> 
     <div class="secondary" ng-repeat="fields in userPF.custom.fields"> 
      <span ng-show="checkForMatch(service.name, fields.services)"> 
      <span ng-repeat="value in fields.values"> 
     {{value.name}} {{value.desc}}<br> 
      </span> 
      </span> 
     </div> 
    </accordion-group> 
</accordion> 

當我運行這段代碼,我得到了以下錯誤:

Error: [$compile:ctreq] Controller 'accordionGroup', required by directive 'accordionHeading', can't be found!

UI似乎是正確的,但爲了以防萬一鏈接,這裏的相應行:

var myApp = angular.module('LSPortal', ['ngResource', 'ngRoute', 'checkBoxFilters', 'ui.bootstrap']) //...etc... 

看着this question前問及相應的修改我的代碼:

會發布小提琴,但控制器非常非常長,而且大多與這個特定問題無關。但如果需要的話會做。

+0

難道問題是我在應用程序的其他地方使用jQuery和Bootstrap? –

回答

0

問題是你必須小心你如何使用Bootstrap和jQuery與已經包含在Angular中的jQuery lite進行UI Bootstrap。

我發現答案是here