For my iron:router, I have a waitOn hook for subscription to a Comments collection. Whenever I switch the hook on, the page can’t load the pictures from Public folder and I am not sure why that is…
But whenever I remove the WaitOn hook, the picture loads again.
Subscription at Router
Router.route('/postPage/:_id', {
name: 'profile',
waitOn: function() {return Meteor.subscribe('comments', this.params._id) ;},
data: function() { return Posts.findOne(this.params._id); }
});
Publication
Meteor.publish('comments', function(postId) {
check(postId, String);
return Comments.find({postId: postId});
});