Can I access the HTML el (button) from an Ember {{action}}?

Monday, May 12, 2014

I have the need to act on the HTML element which triggers an Ember action.

The scenario is simple, let's say I have multiple rows of items, each having an action that pulls some data via an ajax. I want to disable that particular element until the ajax request has completed.

I checked this property but it refers to the Component Class.

So in the below markup, I'd like to capture the element in my component class.

<td><button {{action 'cancel' transaction}} class="btn-danger btn">Cancel</button></td>