lundi 22 mai 2017

Is it possible to pass a function to an Ember.js component to execute it as an action callback?

I'm wondering if it's possible to pass a function as a parameter of an Ember component

// component.hbs


and then, from an action in the component, calling this same function :

// component.js
actions: {
  fun2() {
     let fun = this.get('fun');
     fun();
  }
}




Aucun commentaire:

Enregistrer un commentaire