【问题标题】:Urigo: Angular-Meteor: what sort of array is returned when subscribing Mongo Collection through $meteor.collection serviceUrigo: Angular-Meteor: 通过 $meteor.collection 服务订阅 Mongo Collection 时返回什么样的数组
【发布时间】:2015-07-13 20:20:08
【问题描述】:

我已经通过 $meteor 服务订阅了一个 MongoDB 集合,我得到的是一个文档数组 plus 一些嵌入在数组中的方法。

但每当我执行JSON.stringify(subscribed_collection) 时,只会显示 json 文档?

【问题讨论】:

    标签: meteor angular-meteor


    【解决方案1】:

    $meteor.collection 的返回对象是AngularMeteorCollection。这是那里的一个用法示例:
    $scope.notAutoTodos = $scope.$meteorCollection(Todos, false).subscribe("publicTodos");

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-03
      • 1970-01-01
      • 2015-03-13
      • 2019-05-27
      • 1970-01-01
      • 2020-06-23
      • 2014-10-10
      相关资源
      最近更新 更多