我已经实现了 modal 指令,并将$modal.open
选项背景设置为false
. 但是,现在我可以触发多个模式打开。有没有办法阻止触发按钮在一个模式打开后触发?
var accountSummaryCtrl = function ($scope, $modal, $log) {
$scope.open = function () {
var modalInstance = $modal.open({
templateUrl: '/Apps/generic/modal/Templates/AccountSummary.html',
controller: ModalInstanceCtrl,
backdrop: false
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
};
};
谢谢