【发布时间】:2014-10-03 23:20:33
【问题描述】:
谁能帮我在 emberJS {{action}} 上获取元素?
例如
// application.hbs
<a href="#" {{action 'displayLinks'}}>Get me</a>
// app.js
App.IndexRoute = Ember.Route.extend({
actions: {
displayLinks: function() {
// returns an object with, no element properties
console.log(this);
}
}
});
【问题讨论】: