【问题标题】:Simple #meteor subscribe call giving an error简单的#meteor subscribe 调用给出错误
【发布时间】:2014-02-06 14:29:13
【问题描述】:

服务器:

Meteor.publish('trades', function() {
return Trades.find();
});

客户:

Meteor.subscribe("trades");

两者:

Trades = new Meteor.Collection('trades');

当我运行流星时,它给了我

TypeError: Object # has no method 'subscribe'

有什么建议吗?

【问题讨论】:

    标签: javascript meteor


    【解决方案1】:

    您的客户端代码可能在根目录/ 中运行。然后它也会在服务器上执行并给出这个错误。 (不确定是不是这个)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-05
      • 1970-01-01
      • 1970-01-01
      • 2015-06-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多