angular-fancy-modal icon indicating copy to clipboard operation
angular-fancy-modal copied to clipboard

suggestion: promise when closed

Open jmls opened this issue 10 years ago • 5 comments

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 ;)

jmls avatar Jul 13 '15 20:07 jmls

+1

ilmeskio avatar Dec 15 '15 14:12 ilmeskio

I guess not, then ;)

jmls avatar May 04 '16 12:05 jmls

Sorry I did not really have time to look into this. Would you like to try to submit a PR?

vesparny avatar May 05 '16 09:05 vesparny

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 avatar Jul 04 '18 14:07 itjustwerks

@itjustwerks unfortunately I do not use this lib anymore. Feel free to send a PR, happy to merge it.

vesparny avatar Jul 04 '18 14:07 vesparny