News for hackers. Stuff that matters.
Re:Ask HN: Is Meteor.js mature to enough to use it for build... by nourharidy on Friday March 20, 2015 @06:05PM (#9240940)
About joins in subscriptions, other than the community package Publish Composite, there is an officially supported alternative yet very poorly documented or mentioned, using the Spacebars layer: It is the template helper argument feature, which is in my opinion must more reliable and developer friendly, you can read about it here: https://www.discovermeteor.com/blog/spacebars-secrets-explor...

A typical example would be to display a "post" with comments from two different collections:

Template: <template name="posts"> {{#each post}} {{title}} {{body}} {{#each comment _id}} {{username}} {{body}} {{/each}} {{/each}} </template>

Helpers definition: Template.posts.helpers({ post:function(){ return Posts.find(); }, comment:function(post_id){ return Comments.find({post_id: post_id}); } })

There are no comments on this comment yet.