I have groups and items and the items are related to specific groups. At the "detail page" of a group I want to see all the items belonging to the specific group.
I've tried this
Router.route('/group/:_id', {
name: 'group',
template: 'group',
waitOn: function () {
return this.subscribe("groups", this.params._id);
},
data: function () {
return {
group: Groups.findOne(this.params._id);
items: Items.find({groupId: this.params._id}),
}
}
});
But what should waitOn look like if it should both wait for the specific group AND the items belonging to the group?