Angularjs 角度引导lightbox引发未知提供程序错误
我是AngularJS的新手,正在努力学习东西。我正在尝试创建一个带有的图库,我已经包含了项目所需的所有必要依赖项。包含的依赖项包括:Angularjs 角度引导lightbox引发未知提供程序错误,angularjs,bootstrap-lightbox,angularbootstrap-lightbox,Angularjs,Bootstrap Lightbox,Angularbootstrap Lightbox,我是AngularJS的新手,正在努力学习东西。我正在尝试创建一个带有的图库,我已经包含了项目所需的所有必要依赖项。包含的依赖项包括: <link href="css/angular-bootstrap-lightbox.min.css" rel="stylesheet" /> <script src="js/angular.js"></script> <script src="js/angular-route.min.js"></scrip
<link href="css/angular-bootstrap-lightbox.min.css" rel="stylesheet" />
<script src="js/angular.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/ui-bootstrap-tpls-1.3.2.min.js"></script>
<script src="js/angular-bootstrap-lightbox.min.js"></script>
<script src="js/script.js"></script>
但每当我访问gallery页面时,它总是抛出未知提供程序错误,该错误将指向Lightbox
参数,以及galleryController
中提到的$scope
。不确定这里的依赖关系是什么。但它不能识别灯箱。我已经遵循了上面提到的完整步骤,但没有完全正确地实现这一点。谢谢你的帮助
更新
下面是我得到的错误
angular.js:13424 Error: [$injector:unpr] Unknown provider: LightBoxProvider <- LightBox <- galleryController
http://errors.angularjs.org/1.5.3/$injector/unpr?p0=LightBoxProvider%20%3C-%20LightBox%20%3C-%20galleryController
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:68:12
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4418:19
at Object.getService [as get] (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4571:39)
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4423:45
at getService (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4571:39)
at injectionArgs (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4595:58)
at Object.instantiate (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4637:18)
at $controller (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:10042:28)
at A.link (http://localhost:63211/js/angular-route.min.js:18:216)
at invokeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:9623:9) <ng-view class="ng-scope">(anonymous function) @ angular.js:13424
http://localhost:63211/gallery Failed to load resource: the server responded with a status of 404 (Not Found)
angular.js:13424错误:[$injector:unpr]未知提供程序:LightBoxProvider您需要将注入到galleryController
的依赖项从LightBox
更改为LightBox
。(B在Lightbox
中没有大写)这就解决了问题。你能创建一个plunker,@dreamweiver。。抱歉,但我不确定如何在plunker中复制此功能。。但这就是为什么答案是肯定的。。这么愚蠢的错误。。谢谢你解决了这个问题,伙计:)嗯,我没有拼写错误,所以。。。搜索继续:D
angular.js:13424 Error: [$injector:unpr] Unknown provider: LightBoxProvider <- LightBox <- galleryController
http://errors.angularjs.org/1.5.3/$injector/unpr?p0=LightBoxProvider%20%3C-%20LightBox%20%3C-%20galleryController
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:68:12
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4418:19
at Object.getService [as get] (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4571:39)
at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4423:45
at getService (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4571:39)
at injectionArgs (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4595:58)
at Object.instantiate (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:4637:18)
at $controller (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:10042:28)
at A.link (http://localhost:63211/js/angular-route.min.js:18:216)
at invokeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.js:9623:9) <ng-view class="ng-scope">(anonymous function) @ angular.js:13424
http://localhost:63211/gallery Failed to load resource: the server responded with a status of 404 (Not Found)