【发布时间】:2015-02-17 20:30:58
【问题描述】:
我的回调方法有问题。
我在服务器文件夹中的 methods.js 上创建了 在 client/test/mytest 文件夹中有一个 callback.js 文件。
我的 callback.js 包含以下代码
Template.testHello.events({
"click #testHello": function(e) {
Meteor.call("testmethod",function(error, id) {
if (error) {
Errors.throwError(error.reason);
}
return false;
});
return false;
}
});
和methods.js文件代码是
Meteor.methods({
testmethod: function(att) {
alert("hello testmethod..");
}
});
但是当我点击按钮“testHello”时,它给了我类似“内部服务器错误 500”的错误。
有人知道吗?
谢谢,
【问题讨论】:
标签: meteor