36 lines
965 B
JavaScript
36 lines
965 B
JavaScript
|
|
|
|
app.controller('uibModalCtrl', ['$scope','$uibModal', function ($scope,$uibModal) {
|
|
|
|
$scope.open = function () {
|
|
var modalInstance = $uibModal.open({
|
|
animation: true,
|
|
backdrop:false, // 不让点击背景关闭系统
|
|
templateUrl: 'app/model/modalTemplate.html',
|
|
controller: 'uibModalInstanceCtrl',
|
|
size: 'lg',
|
|
//windowTopClass:'dialog'
|
|
});
|
|
|
|
|
|
modalInstance.result.then(
|
|
function (nclose) { $scope.returnData=nclose },
|
|
function (ndismiss) { $scope.returnData=ndismiss }
|
|
)
|
|
|
|
}
|
|
}])
|
|
|
|
|
|
app.controller('uibModalInstanceCtrl', ['$scope', '$uibModalInstance', function ($scope,$uibModalInstance) {
|
|
|
|
$scope.Ok = function () {
|
|
$uibModalInstance.close("界面已经保存并且关闭");
|
|
}
|
|
|
|
$scope.Cancel = function () {
|
|
$uibModalInstance.dismiss("界面直接退出");
|
|
}
|
|
|
|
}])
|