mercredi 5 octobre 2016

Ember action-helper pass reference to the clicked element

I made several attempts to get a referance to the clicked html element, which was triggering the action. Nothing worked and I could find something useful in the web so can you help me here, please?

e.g. I want to have something like

//my-component.hbs    
<th >click me</th>

//my-component.js
actions: {
    clicked(type, _this) {
        Ember.$(_this).css("color", "red");
    },




Aucun commentaire:

Enregistrer un commentaire