mardi 13 février 2018

What is the proper way to invoke a closure action inside a component?

I pass a closure action into my component like so:



How should I invoke this in my component?

actions:{
loadMoreDeployments(){
  // which one of the following three invocations is best?
  this.attrs.loadMoreDeployments();
  this.get('loadMoreDeployments')();
  this.loadMoreDeployments();
}

}




Aucun commentaire:

Enregistrer un commentaire