我有以下Meteor方法设置:
// Defined in collections/collections.js
Meteor.methods({
email: function(options) {
this.unblock();
Email.send(options);
}
});
Run Code Online (Sandbox Code Playgroud)
我称之为:
// Defined in client/main.js
Meteor.call('email', {
to: 'yeahright@noneya.com', from: 'yeahright@noneya.com',
text: 'testing testing'
});
Run Code Online (Sandbox Code Playgroud)
我在浏览器控制台中收到两个错误:
Exception while simulating the effect of invoking 'email'
ReferenceError {stack: "ReferenceError: Email is not defined? at Meteor…js?acc2397bd1f7321a583a30e0d4628ec4f9fded4b:369:3", message: "Email is not defined"}
ReferenceError: Email is not defined
(etc....)
Run Code Online (Sandbox Code Playgroud)
另一个在我的服务器shell中运行meteor:
Exception while invoking method 'email' ReferenceError: Email is not defined
(etc....)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2055 次 |
| 最近记录: |