Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal not closing just hiden #214

Open
usman250994 opened this issue Jun 19, 2017 · 4 comments
Open

Modal not closing just hiden #214

usman250994 opened this issue Jun 19, 2017 · 4 comments

Comments

@usman250994
Copy link

usman250994 commented Jun 19, 2017

I am trying to close modal but I am failing to do so. I tried to even trigger modal.element.on() function but it is either not working :( how can I correctly close modal to release page . Currently page is dead/ un clickable. below is my code..

`
(function () {
var app = angular.module("formModule", ['ngRoute','angularModalService']);

app.controller("formController", function($scope,$http,$rootScope,$location,ModalService) {

$scope.BookNow= function()
{

ModalService.showModal({
templateUrl: "views/feature.html",
controller: "featureController"
}).then(function(modal) {

modal.element.modal();
modal.close.then(function(result) {
  console.log(result);
});

});
});
}

});

app.controller("featureController", function($scope,$rootScope,close) {

$scope.close = function(result) {
close(result,500);}

});

})();
`

@zupa94
Copy link

zupa94 commented Aug 25, 2017

$scope.close = function() { $uibModalStack.dismissAll(); };

And your html button for dismissing should have data-dismiss="modal".

@vignesh-vnix
Copy link

@zupa94 It not helps me. It does works for you ?

@mskrzypkowski
Copy link

See #225 (comment)

@decherneyge
Copy link
Contributor

decherneyge commented Nov 9, 2018

What does the HTML of your modal look like? Do you have your close actions (X in upper right, close buttons, and background dismissal) wired up to the scope.close in featureController ?

For the background click dismissal see #225 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants