您好我想使用angularjs controller.js代码打开和关闭bootstrap模型弹出窗口.
原文链接:https://www.f2er.com/angularjs/143518.html我的控制器代码
app.controller('RoleViewCtrlq',['$scope','$modalInstance','$modal',function ($scope,$modalInstance,$modal) { $scope.open = function () { debugger; var modalInstance = $modal.open({ templateUrl: 'myModalContent.html',}); $scope.ok = function () { $modalInstance.close(); }; $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; } } ]);
在这里,我创建了样本
https://plnkr.co/edit/xRhCR7qidlr24M8nAOA6?p=preview