[英]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.