我試圖從使用的角度引導模態服務:
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
<script src="js/index.js"></script>
我的應用程序控制器(index.js):
var app = angular.module('emaApp', ['ui.bootstrap']);
app.controller('mainCtrl', ['$scope', '$http', '$modal', function($scope, $http, $modal) {
// ...
}]);
但是,我沒有得到超出此錯誤消息,我看不出有什麼問題:
jquery.min.js:2 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.6.1/$injector/modulerr?p0=emaApp&p1=Error%3A%…host%3A8080%2Fweb%2Fbower_components%2Fangular%2Fangular.min.js%3A21%3A332)
at angular.js:38
at angular.js:4759
at q (angular.js:357)
at g (angular.js:4720)
at eb (angular.js:4642)
at c (angular.js:1838)
at Mc (angular.js:1859)
at pe (angular.js:1744)
at HTMLDocument.<anonymous> (angular.js:32977)
at j (jquery.min.js:2)
@VinodLouis我不知道,[這裏](https://angular-ui.github.io/bootstrap/ )它說'ui.bootstrap.modal'。 – displayname
確定它不是'$ uibModal'? –