Hi all,
Suppose I have a blog app with iron router. I have 100 posts but I get only the first 50 in a subscription in iron router. for example:
Router.configure({
waitOn: function() {
return [Meteor.subscribe("getPosts", 50)];
}
});
A user saved a old post link. Is the post 51 for example.
If I use this in the post page route:
Router.route('post/:_id', {
waitOn: function() {
return Meteor.subscribe("getPost", this.params._id);
}
});
If the post is in the first 50, I will always be making a free call.
Maybe is a easy question, but I do not see the solution. I try some solutions: a template subscription, an if (in the waitOn of the post) to check if I have already the post ), … but I do not find the “good” way.
Thanks