我对angular和bootstrap不熟悉,我的Login.html和LoginController在一起。
我尝试创建一个模式弹出窗口,因此,为了执行此操作,我需要向控制器添加$ modal,当前控制器如下所示:
angular.module('loginController', ['loginService'])
.controller('LoginCtrl', ['$scope', 'LoginService', function($scope, LoginService) {
但是当我这样做时:
angular.module('loginController', ['loginService','ui.bootstrap'])
.controller('LoginCtrl', ['$scope', '$modal','LoginService', function($scope, $modal,LoginService) {
我收到一个错误,并且出现以下错误:
Error: [$injector:modulerr] Failed to instantiate module loginController 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.
我想我需要在某个地方添加bootstrap-ui,也许可以:
angular.module('myApp', [
'ngRoute',
'bootstrap-ui', -> **when i add it, i still get the exception**.
我究竟做错了什么 ?
您需要引用中的ui-bootstrap-*.js
文件之一html
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句