我是 Angularjs 的新手,我想问一下如何使用“ui-bootstrap”使我的 $modal 工作。
我在我的控制台中遇到这种错误。
angular.min.js:118 Error: [$injector:unpr] http://errors.angularjs.org/1.5.8/$injector/unpr?p0=%24modalProvider%20%3C-%20%24modal%20%3C-%20myCtrl
at angular.min.js:6
at angular.min.js:43
at Object.d [as get] (angular.min.js:40)
at angular.min.js:43
at d (angular.min.js:40)
at e (angular.min.js:41)
at Object.invoke (angular.min.js:41)
at S.instance (angular.min.js:89)
at p (angular.min.js:65)
at g (angular.min.js:58)
// my controller
<script >
angular.module('myApp', ['ui.bootstrap'])
.controller('myCtrl', [ '$scope', '$modal',
function($scope, $modal) {
}]);
我的头标签:
<link rel="stylesheet" type="text/css" href="/myAngularApp/css/style.css">
<script type="text/javascript" src="/myAngularApp/css/jquery/jquery.js"></script>
<script type="text/javascript" src="/myAngularApp/css/angular/angular.min.js"></script>
<script type="text/javascript" src="/myAngularApp/css/angular/angular-animate.min.js"></script>
<script type="text/javascript" src="/myAngularApp/css/angular/angular-route.min.js"></script>
<script type="text/javascript" src="/myAngularApp/css/bootstrap/bootstrap.js"></script>
<script type="text/javascript" src="/myAngularApp/css/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="/myAngularApp/css/bootstrap/ui-bootstrap.min.js"></script>
<script type="text/javascript" src="/myAngularApp/css/bootstrap/ui-bootstrap-tpls.min.js"></script>