mardi 2 février 2016

How to access another controller's action from another controller

I have just upgraded my Ember application to the newest version, but then while testing its functionality, some actions doesn't work. My previous code which is working fine in older version is below.

export default Ember.Controller.extend({
needs: 'sales-order',
actions: {
    showModal: function(mode){
        this.get('controllers.sales-order').send('showModal', mode)
    }
  }
})

Looks like the "needs" is depreciated.

Aucun commentaire:

Enregistrer un commentaire