angular-fancy-modal
angular-fancy-modal copied to clipboard
suggestion: promise when closed
I see that there is a promise returned when the dialog is opened ..
opened {Promise}
A promise which will resolve when the modal is fully loaded.
would it be possible to add a promise when the dialog is closed ? Like ng-modal does in ng-material
$mdDialog.show({
controller: DialogController,
templateUrl: 'dialog1.tmpl.html',
parent: angular.element(document.body),
targetEvent: ev,
})
.then(function(answer) {
// ok button pressed
}, function() {
cancel button pressed
});
as you can see, this makes coding very simple ;)
+1
I guess not, then ;)
Sorry I did not really have time to look into this. Would you like to try to submit a PR?
Realize this is old, but a closed promise would be so helpful. Seems like a ton of overhead to need to inject $rootScope to monitor the closed event. Any chance someone's still monitoring this?
@itjustwerks unfortunately I do not use this lib anymore. Feel free to send a PR, happy to merge it.