Angularjs 尽管加载顺序和依赖项声明正确,但未加载ui.bootstrap

Angularjs 尽管加载顺序和依赖项声明正确,但未加载ui.bootstrap,angularjs,module,angular-ui-bootstrap,Angularjs,Module,Angular Ui Bootstrap,我在index.html中加载了ui.bootstrap,但它在控制台中触发了一个错误,并阻止了我的应用程序的其余部分加载。所有URL都返回正确的文件。我尝试了几种方法来交换加载顺序。我已经尝试在一个或另一个主模块中声明依赖关系。我已经检查了模块名在源代码中是否为“ui.bootstrap”。这件事让我有点困惑。我看到的大多数答案都与加载顺序有关,但这似乎不是问题所在 角度版本:1.3.13 Angular ui引导版本:0.12.0从bower拉出安装Angular引导 index.html标

我在index.html中加载了ui.bootstrap,但它在控制台中触发了一个错误,并阻止了我的应用程序的其余部分加载。所有URL都返回正确的文件。我尝试了几种方法来交换加载顺序。我已经尝试在一个或另一个主模块中声明依赖关系。我已经检查了模块名在源代码中是否为“ui.bootstrap”。这件事让我有点困惑。我看到的大多数答案都与加载顺序有关,但这似乎不是问题所在

角度版本:1.3.13

Angular ui引导版本:0.12.0从bower拉出安装Angular引导

index.html标题:

  <script src="/lib/bcryptjs/dist/bcrypt.min.js"></script>
  <script src="/lib/angular/angular.js"></script>
  <script href="/lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
  <script src="/lib/angular-route/angular-route.js"></script>
  <script src="/lib/controllers.js"></script>
  <script src="/lib/services.js"></script>
  <script src="/lib/dirPagination.js"></script>
  <script src="/lib/app.js"></script>
  <link href="/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
目录控制器声明:

var bookCatalog = angular.module('bookCatalog', [
  'ngRoute',
  'catalogControllers',
  'ui.bootstrap',
  'angularUtils.directives.dirPagination'
])
var catalogControllers = angular.module('catalogControllers', [
  'ngRoute', 
  'ui.bootstrap'
])
控制台错误日志:

Uncaught Error: [$injector:modulerr] Failed to instantiate module bookCatalog due to:
Error: [$injector:modulerr] Failed to instantiate module catalogControllers 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-build.3042+sha.76e57a7/$injector/nomod?p0=ui.bootstrap
    at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:120:12
    at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:215:17
    at ensure (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:139:38)
    at module (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:213:14)
    at angular.module (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:686:31)
    at angular.module (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1019:38)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4097:22
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4098:40
http://errors.angularjs.org/1.3.13/$injector/modulerr?p0=ui.bootstrap&p1=Er…0at%20https%3A%2F%2Fxx.xxx.xx.xxx%2Flib%2Fangular%2Fangular.js%3A4098%3A40
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:63:12
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4120:15
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4098:40
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4098:40
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
http://errors.angularjs.org/1.3.13/$injector/modulerr?p0=catalogControllers…les%20(https%3A%2F%2Fxx.xxx.xx.xxx%2Flib%2Fangular%2Fangular.js%3A4081%3A5)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:63:12
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4120:15
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
    at https://xx.xxx.xx.xxx/lib/angular/angular.js:4098:40
    at forEach (https://xx.xxx.xx.xxx/lib/angular/angular.js:323:20)
    at loadModules (https://xx.xxx.xx.xxx/lib/angular/angular.js:4081:5)
    at createInjector (https://xx.xxx.xx.xxx/lib/angular/angular.js:4007:11)
    at doBootstrap (https://xx.xxx.xx.xxx/lib/angular/angular.js:1445:20)
    at Object.angular.resumeBootstrap (https://xx.xxx.xx.xxx/lib/angular/angular.js:1474:12)
http://errors.angularjs.org/1.3.13/$injector/modulerr?p0=BookCatalog&p1=Err…ap%20(https%3A%2F%2Fxx.xxx.xx.xxx%2Flib%2Fangular%2Fangular.js%3A1474%3A12)

非常感谢。

我在创建控制器时遇到了相同的错误。回顾语法,我发现我没有正确定义控制器结构。再次检查控制器的结构是否正确

我想应该是第四名position@squiroid好主意。我试过了。不工作。错误是否已更改或相同?是的,扫描控制台。没有变化。已清除缓存,已在其他浏览器中签入。没有变化。这就是我的目的,无论我做什么都没有区别。Bootstrap-0.12.1里程碑将用于修复现有Angular 1.2支持版本的错误。摘自。是否尝试使用较新版本的引导?