是的你可以!
$uibModal是超级灵活的工具.
我对Typescript不是很熟悉,但这是我的JS解决方案:
angular
.module('appName',['ui.bootstrap'])
.controller('SomePageController',['$scope','$uibModal','$log',function ($scope,$uibModal,$log) {
首先,您要做的是更改openModalPopup()方法:
// Instantiate the modal window
var modalPopup = function () {
return $scope.modalInstance = $uibModal.open({
templateUrl: 'blocks/modal/dialog.html',scope: $scope
});
};
// Modal window popup trigger
$scope.openModalPopup = function () {
modalPopup().result
.then(function (data) {
$scope.handleSuccess(data);
})
.then(null,function (reason) {
$scope.handleDismiss(reason);
});
};
// Close th