Why is my modal dialog leaving shadow behind?
Modal service for AngularJS - supports creating popups and modals via a service.
Brought to you by:
evanfcrane
Originally created by: miliu99
I followed the sample code and it is kind of working, except that the then() function doesn't get called when I dismiss the dialog. I'm not sure if this is related to the fact I'm also using AngularStrap in the project.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: recyclethis
I've had the same problem when trying to close the modal using the close function injected into my modal controller. My workaround has been to push the current modal into the $rootScope in the .then function, and close it in my controller by grabbing the modal from the rootScope. Smells, but it works.
Then when I want to close the modal, rather than calling close I use
scope.rootScope.currentModal.element.modal('hide');
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Jakobovski
You can also use jQuery. Just add an
idtag to the modal and then $('#modal-idl').modal('hide');View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rossrossp
I also have this issue, but only when using $http and closing after the request has finished:
$http({ method : "POST", url : "/api/bla", data: { } }).then(function mySuccess(response) { if(response.data.error) { $scope.errorMessage = response.data.error; } else { close(true, 500); } }, function myError(response) { //bla });Any ideas?