indexiatech / ember-idx-modal

Ember Indexia Modal
http://indexiatech.github.io/ember-idx-modal/#/gettingstarted
Apache License 2.0
17 stars 13 forks source link

on-close modal action or hook #25

Open hugoruscitti opened 9 years ago

hugoruscitti commented 9 years ago

Hi!, i'm making a modal dialog with some shared state, and i need to detect the close modal event or similar to reset some attributes on my application.

there are some hook or event in ember-idx-modal to do that? thanks!

arinhouck commented 9 years ago

I am also curious for a solution to this. As I need to transition route on clicking out of a modal.

After further investigation I found a solution.

in your model handlebars add:

 is-open=isOpen

and then observe on it:

  isOpenDidChange: function() {
    if (!this.get('isOpen')) {
      // Code here for when modal closes
    }
  }.observes('isOpen'),