ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Modal Promises

Open mbuster opened this issue 12 years ago • 3 comments

I think it would be super useful to have the .show() and .hide() methods for modals (and other related views) return a promise, which would be resolved when the modal (or other view) finished showing or hiding. I have some modals with dynamic content that is currently being loaded as the modal is shown, which can cause hiccups in the .show() animation. It would be cool if we could do something like this:

myModal.show().then( function(){ //do stuff that you only want to happen when you know the modal has finished animating });

or:

myModal.hide().then( function(){ //dispose of some stuff the modal was using });

mbuster avatar Mar 25 '14 13:03 mbuster

Added via 393850086fbff30f5f04026e70f8143c9c21f06f

ajoslin avatar Mar 27 '14 02:03 ajoslin

Thanks @ajoslin.

mbuster avatar Mar 27 '14 12:03 mbuster

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 06 '18 06:09 ionitron-bot[bot]