【发布时间】:2015-03-20 09:34:58
【问题描述】:
点击提交时,我不断返回“无法读取未定义的属性‘数据’”错误:
Template.postItem.rendered = function() {
$(document).on('click', '#mysubmit', function(e, template) {
e.preventDefault();
var inputval = $("#myinput").val();
var time = {
begins: inputval,
postId: template.data._id
};
time._id = Times.insert(time);
});
}
Meteor 不应该从模板接收“template.data._id”吗?
【问题讨论】: