0
我想將click
事件添加到組件tagname
這是做什麼的正確方法?如何將點擊事件添加到在ember組件中的`tagName`?
這裏是我的代碼:請詳見註釋提前
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'li', //onclick how to call 'selectedCard'?
firstBalanceType : '',
firstBalanceAmount : '',
lastBalanceType : '',
lastBalanceAmount : '',
actions : {
selectCard : function(card) { //requrie to pass the card here
//console.log('card selected' + card);
this.sendAction('enableNext', card);
}
}
});
感謝