i have component like this and want to set some attributes on it:
OlapApp.ItemRowsComponent = Ember.Component.extend({
tagName: 'li',
classNameBindings: ['currentItem.isMeasure:d_measure:d_dimension'],
didInsertElement: function() {
this.$().draggable({
});
},
actions: {
removeItem: function(item) {
item.deleteRecord();
item.save();
},
didClick: function(item) {
if (item.get('isMeasure')) {
item.deleteRecord();
item.save();
}
}
}
});
and i call this component like this :
{{#each item in getRowItem}}
{{item-rows currentItem=item}}
{{/each}}
item have a id property item.id
now i want to set this id to data-id of component to create an element like this :
<li data-id='id of item'>Some text</li>