1
新文档的问题是在服务器上的下一个代码:Meteor.publish服务器上不显示在客户端
Meteor.publish(null , function() {
let events = [];
Groups.find({participants: this.userId}).forEach(function(item) {
events.push(item.latestEvent);
});
return Events.find({_id: {$in: events}});
});
不提供可能性,看看客户端上的新文件> Events.find().fetch()
无需重新加载页面。
两个集合都在lib
文件夹:
Groups = new Mongo.Collection('groups');
Events = new Mongo.Collection('events');
我敢肯定的问题是数据的反应源,但仍无法修复它。
谢谢你的帮助!