我是AngularJs.I中的新人有错误
Error: $injector:unpr Unknown Provide
angularjs
var App = angular.module('StartModule', ["ui.bootstrap"]);
App.controller('ModalDemoCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
$scope.test = function () {}});
添加$ uibModal 时出现错误
答案 0 :(得分:0)
注入 $ uibModalInstance 依赖项。并使用 $ uibModalInstance.dismiss('取消')等事件。
var App = angular.module('StartModule', ["ui.bootstrap"]);
App.controller('ModalDemoCtrl', ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {
$scope.test = function () {}});