简体   繁体   English

在ui-bootstrap中找不到指令'accordionGroup'所需的控制器'accordion'错误

[英]Controller 'accordion', required by directive 'accordionGroup', can't be found error in ui-bootstrap

I am using ui-bootstrap for accordian, I have included ui.bootstrap in app.js. 我正在为accordian使用ui-bootstrap,我在app.js中包含了ui.bootstrap。 I am getting this error - Controller 'accordion', required by directive 'accordionGroup', can't be found! 我收到此错误-指令'accordionGroup'所需的控制器'accordion'找不到!

Here is the code I am using - 这是我正在使用的代码-

    <accordian close-others="oneAtATime">
        <accordion-group is-open="false" heading="Requests">
        <div ng-repeat="">
        < accordion-group heading="">
            <table class="table table-striped table-bordered">
              <thead>
                <tr>
                  <th>H</th>
                  <th>C</th>
                </tr>
              </thead>
             <tbody>
                <tr ng-repeat="" ng-init="inner=$index">
                   <td>{{}}</td>
                   <td>{{}}</td>
               </tr>
             </tbody>
          </table>
      </accordion-group>
    </div>
  </accordion-group>
 </accordian>
<accordian close-others="oneAtATime">
        ^
You got a typo here

I am assuming that you have not made any syntax/spelling mistakes. 我假设您没有犯任何语法/拼写错误。 If you still get the same error, then probably it has something to do with your dependencies. 如果仍然遇到相同的错误,则可能与您的依赖项有关。 Make sure you have included the right files. 确保包含正确的文件。

And for ui-bootstrap dependency, "accordion" is a template, so you have to include src = "ui-bootstrap-tpls.js" and not "ui-bootstrap.js". 对于ui-bootstrap依赖性,“ accordion”是一个模板,因此您必须包括src =“ ui-bootstrap-tpls.js”而不是“ ui-bootstrap.js”。 Hope this helps 希望这可以帮助

I see from the sample code you posted there are some decrependacies in the spelling of your element tags, accordion and accordian have you checked these? 我从您发布的示例代码中看到,元素标签的拼写有些下降,手风琴和手风琴您检查了吗? Is that not the possble issue here? 这不是这里可能的问题吗? I'm using accordion without any issues myself in my current project. 我在当前项目中使用的手风琴没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UI-Bootstrap手风琴指令不起作用 - UI-Bootstrap Accordion Directive not working AngularJS-UI引导手风琴-在ng-repeat中使用ng-controller不起作用 - AngularJS - ui-bootstrap accordion - using ng-controller inside ng-repeat doesn't work 角度与茉莉花错误:指令所需的控制器找不到 - Angular with Jasmine error: Controller required by directive can't be found 错误:找不到指令“ slide”所需的控制器“轮播” - Error: Controller 'carousel', required by directive 'slide', can't be found 错误:[$ compile:ctreq]指令所需的控制器,找不到 - Error: [$compile:ctreq] Controller required by directive , can't be found AngularJS错误:指令“ drawing”所需的控制器“ drawing”找不到 - AngularJS Error: Controller 'drawing', required by directive 'drawing', can't be found ui-bootstrap:从指令控制器内访问模式实例 - ui-bootstrap: accessing modal instance from within directive controller 无法找到指令所需的控制器 - Controller Required By Directive Can't Be Found 无法找到指令&#39;...&#39;所需的控制器&#39;ngModel&#39; - Controller 'ngModel', required by directive '…', can't be found 找不到指令所需的AngularJS控制器 - AngularJS controller, required by directive, can't be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM