【发布时间】:2015-06-25 01:19:27
【问题描述】:
这是一个 Meteor/Blaze 问题。
我有一个名为 Lists 的 Mongo 集合,其中包含 postId 的列表,我想查询并使用另一个名为 Posts 的集合中的数据填充该集合。
架构
Posts: [{
_id: String,
// post data, I want to access this from a repeated list
}]
Lists: [{
_id: String,
posts: [String] // of ids
}]
列表模板:
{{#if posts}} /// referring to List.posts
<div class="list-posts">
<ul>
{{#each posts}}
// here I would like query for the corresponding Posts data
{{/each}}
</ul>
</div>
{{/if}}
我不确定如何使用 Meteor 执行此操作。模板助手?
【问题讨论】:
标签: meteor meteor-blaze