Angular UI手风琴的问题

时间:2015-08-26 18:22:45

标签: angularjs angular-ui-bootstrap

我在使用Angular手风琴时遇到了一些问题。这是HTML / Angular代码:

<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>

当我运行此代码时,我收到以下错误:

  

错误:[$ compile:ctreq]控制器'accordionGroup',需要   指令'accordionHeading',找不到!

UI似乎正确链接,但以防万一,这里是适当的行:

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

在询问并修改我的代码之前,先查看this question

会发布一个小提琴,但控制器非常非常长,并且与这个特定问题大多无关。但如果需要,也会这样做。

0 个答案:

没有答案