samedi 25 juin 2016

Ember - Pass html element as parameter from ember template to component on click action

How can we pass element object in handlebar onclick action. I tried passing "this" but that doesn't worked.

<a href="javascript:void(0)" onclick= >Menu Item</a>

Component.js

Ember.Component.extend({
  actions: {
    menuClickEvent :function(element) {          
    // need element <a> to do jquery operation
    }
  }
});




Aucun commentaire:

Enregistrer un commentaire