-1
rated 0 times
[
4]
[
5]
/ answers: 1 / hits: 52092
/ 9 Years ago, wed, may 20, 2015, 12:00:00
I am using the Angular-ui/bootstrap modal in my project.
Here is my modal:
$scope.toggleModal = function () {
$scope.theModal = $modal.open({
animation: true,
templateUrl: 'pages/templates/modal.html',
size: sm,
scope: $scope
});
}
One is able to close the modal by clicking the ESC button or clicking outside the modal area. Is there a way to run a function when this happens? I am not quite sure how to catch the sort of closing.
I know that I can manually dismiss a modal by having a ng-click=closeModal()
like this:
$scope.closeModal = function () {
$scope.theModal.dismiss('cancel');
};
More From » angularjs