控制器 'accordion',指令 'accordionGroup' 要求 ui 红色,在 ui-bootstrap 中找不到错误
Controller 'accordion', required by directive 'accordionGroup', can't be found error in ui-bootstrap
我正在为手风琴使用 ui-bootstrap,我在 app.js 中包含了 ui.bootstrap。我收到这个错误 -
控制器 'accordion',指令 'accordionGroup' 要求 ui 红色,找不到!
这是我使用的代码 -
<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
我从您发布的示例代码中看到您的元素标签、手风琴和手风琴的拼写有一些错误,您检查过这些吗?这不是这里可能的问题吗?我在我当前的项目中使用手风琴没有任何问题。
我假设您没有犯任何 syntax/spelling 错误。如果您仍然遇到相同的错误,则可能与您的依赖项有关。确保您包含了正确的文件。
而对于 ui-bootstrap 依赖项,"accordion" 是一个模板,因此您必须包含 src = "ui-bootstrap-tpls.js" 而不是 "ui-bootstrap.js"。希望这有帮助
我正在为手风琴使用 ui-bootstrap,我在 app.js 中包含了 ui.bootstrap。我收到这个错误 - 控制器 'accordion',指令 'accordionGroup' 要求 ui 红色,找不到!
这是我使用的代码 -
<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
我从您发布的示例代码中看到您的元素标签、手风琴和手风琴的拼写有一些错误,您检查过这些吗?这不是这里可能的问题吗?我在我当前的项目中使用手风琴没有任何问题。
我假设您没有犯任何 syntax/spelling 错误。如果您仍然遇到相同的错误,则可能与您的依赖项有关。确保您包含了正确的文件。
而对于 ui-bootstrap 依赖项,"accordion" 是一个模板,因此您必须包含 src = "ui-bootstrap-tpls.js" 而不是 "ui-bootstrap.js"。希望这有帮助