我正在尝试集成Angular bootstrap模态形式,
这是我的控制器
angular.module('app').controller('groupController',['groupService','$uibModal','toastr','$scope',function(groupService,toastr,$uibModal,$scope)
Run Code Online (Sandbox Code Playgroud)
我添加了$ uibModal作为依赖.在我的app.js中我也添加了ui.bootstrap作为依赖项,
我的angular.bootstrap版本是1.3.3
我的模态功能如下
vm.viewGroupDetail = function(userDetails) {
var scope = $scope.$new();
scope.userDetails = userDetails;
vm.modalInstance = $uibModal.open({
animation: true,
templateUrl: 'app/views/groups/group_details_modal.html',
windowClass: 'd-modal',
size: 'md',
scope: scope
// resolve: {
// userDetails: function () {
// return ;
// }
// }
});
};
Run Code Online (Sandbox Code Playgroud)
当我尝试使用断点并检查控制流时,它进入viewGroupDetail函数.但是在$ uibModal.open()时,控件会中断
我在这里失踪了什么?我在堆栈溢出中尝试了其他相关问题,没有给我一个解决方案,所以发布我自己的查询