angularjs - 错误 : [$injector:nomod] Module 'ui.bootstrap' is not available! 您拼写错误 [...]

标签 angularjs angular-ui-bootstrap bower

我在这里遇到了这个问题,到目前为止我还没有得到任何一致的解决方案。我在前端使用 Angular 运行 Java 项目,并尝试使用 ui-bootstrap 实现自动完成功能,但我总是收到此错误。

Uncaught Error: [$injector:modulerr] Failed to instantiate module textChangrApp due to: Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to: Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.3.0-rc.4/$injector/nomod?p0=ui.bootstrap
    at http://localhost:8080/bower_components/angular/angular.js:80:12
    at http://localhost:8080/bower_components/angular/angular.js:1787:17
    at ensure (http://localhost:8080/bower_components/angular/angular.js:1711:38)
    at module (http://localhost:8080/bower_components/angular/angular.js:1785:14)
    at http://localhost:8080/bower_components/angular/angular.js:4024:22
    at forEach (http://localhost:8080/bower_components/angular/angular.js:330:20)
    at loadModules (http://localhost:8080/bower_components/angular/angular.js:4008:5)
    at http://localhost:8080/bower_components/angular/angular.js:4025:40
    at forEach (http://localhost:8080/bower_components/angular/angular.js:330:20)
    at loadModules (http://localhost:8080/bower_components/angular/angular.js:4008:5) http://errors.angularjs.org/1.3.0-rc.4/$injector/modulerr?p0=ui.bootstrap&p…2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A4008%3A5)
    at http://localhost:8080/bower_components/angular/angular.js:80:12
    at http://localhost:8080/bower_components/angular/angular.js:4047:15
    at forEach (http://localhost:8080/bower_components/angular/angular.js:330:20)
    at loadModules (http://localhost:8080/bower_components/angular/angular.js:4008:5)
    at http://localhost:8080/bower_components/angular/angular.js:4025:40
    at forEach (http://localhost:8080/bower_components/angular/angular.js:330:20)
    at loadModules (http://localhost:8080/bower_components/angular/angular.js:4008:5)
    at createInjector (http://localhost:8080/bower_components/angular/angular.js:3948:11)
    at doBootstrap (http://localhost:8080/bower_components/angular/angular.js:1480:20)
    at bootstrap (http://localhost:8080/bower_components/angular/angular.js:1501:12) http://errors.angularjs.org/1.3.0-rc.4/$injector/modulerr?p0=textChangrApp&…F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1501%3A12) angular.js:80(anonymous function) angular.js:80(anonymous function) angular.js:4047forEach angular.js:330loadModules angular.js:4008createInjector angular.js:3948doBootstrap angular.js:1480bootstrap angular.js:1501angularInit angular.js:1395(anonymous function) angular.js:24904trigger angular.js:2715eventHandler angular.js:2986



//index.html
    <head>
        <!-- ... -->
        <script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
        <script src="../bower_components/angular/angular.js"></script>
        <script src="../bower_components/angular-aria/angular-aria.js"></script>
        <script src="../bower_components/angular-animate/angular-animate.js"></script>
        <script src="../bower_components/hammerjs/hammer.js"></script>
        <script src="../bower_components/angular-material/angular-material.js"></script>
    </head>
//app.js
    angular
      .module( 'textChangrApp', [ 'ngAnimate', 'ngMaterial','directive.g+signin', 'ui.bootstrap'])

我觉得我的 <head> 肯定有问题导入时,因为到目前为止它工作正常,现在它崩溃了。希望你能在这方面给我一点帮助。

谢谢你。

最佳答案

您必须加载 ui.boostrap 模块 之后 angularjs 文件。

关于angularjs - 错误 : [$injector:nomod] Module 'ui.bootstrap' is not available! 您拼写错误 [...],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26615918/

相关文章:

javascript - Polymer 和外部 Node.js 库

javascript - 动态指定要在 Angular 指令中使用的 Controller

html - 如何使用 Angular 确定 html 表的第一行?

javascript - 为什么我的 onclick 不起作用?

ruby-on-rails - Bootstrap UI Angular Accordion 和 Rails 模板必须有一个根元素

css - ng-repeat 仅在与 uib-dropdown 一起使用时填充数组中的最后一个条目

javascript - Angular - 如果有要显示的字符串,则只显示一个值

html - Bootstrap 4 自定义滚动条

node.js - Ember : handlebars does not satisfy its siblings' peerDependencies

eclipse - Eclipse 中未定义的 CSS/JavaScript/Image 文件