0
我有这个代码/服务器文件夹public.js:流星方法没有找到
Meteor.methods({
foo: function (myarg) {
return myarg;
}
});
我挂钩按钮单击事件在我的模板脚本是这样的:
Template.myTemplate.events({
'click #clickme' : function() {
Meteor.call(foo, 'ola', function(error, result) {
alert(result);
});
}
});
我看不到这里有什么问题,因为当我点击我的按钮时,我收到消息'Uncaught ReferenceError:foo is not defined'
啊,谢谢 - 不知道我是怎么错过的。 –