我在關注Meteor.js tutorial,但我被困在這一點上。模板的meteorjs關鍵事件
'keyup [name=todoItem]': function(event){
console.log("You just tapped a key on your keyboard.");
}
不工作
這裏是我的代碼:
Template.todoItem.events({
'click .delete-todo': function(event) {
event.preventDefault();
var documentId = this._id;
Todos.remove({_id: documentId});
},
'keyup [name=todoItem]': function(event) {
console.log("just tapped key on keyboard");
}
});
提前感謝!
你可以顯示你的'todoItem'模板的HTML嗎? –