[英]Simple #meteor subscribe call giving an error
Server : 服务器:
Meteor.publish('trades', function() {
return Trades.find();
});
Client: 客户:
Meteor.subscribe("trades");
Both: 都:
Trades = new Meteor.Collection('trades');
When I run meteor, its giving me 当我运行流星时,它给了我
TypeError: Object # has no method 'subscribe' TypeError:对象#没有方法“订阅”
Any suggestions? 有什么建议么?
You might have your client code running in the root directory /
. 您的客户端代码可能在根目录
/
运行。 It would also then execute on the server and give this error. 然后,它还将在服务器上执行并给出此错误。 (Not sure if its this).
(不确定它是否是这个)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.