mardi 26 mai 2015

ember init modal controller

I have a modal dialog as a component, and I want to init a controller property with some value from the model (that changes every time I open the modal)

The thing is that the modal is hiding and showing, so didInsertElement is called only once.

All the solutions I see for it are saying to do it on setupController or any other route related methods, but I have no route. All I have is:

routes/application.js:

showModal: function(name, model) {
      this.render(name, {
        into: 'application',
        outlet: 'modal',
        model: model
      });
    },




Aucun commentaire:

Enregistrer un commentaire