|
@@ -12,10 +12,7 @@ Router.configure({
|
|
|
loadingTemplate: "loading",
|
|
|
notFoundTemplate: "notFound",
|
|
|
waitOn: function () {
|
|
|
- return [
|
|
|
- Meteor.subscribe('posts'),
|
|
|
- Meteor.subscribe('comments'),
|
|
|
- ];
|
|
|
+ return Meteor.subscribe('posts');
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -27,6 +24,9 @@ Router.route('/', {
|
|
|
|
|
|
Router.route('/posts/:_id', {
|
|
|
name: 'postPage',
|
|
|
+ waitOn: function () {
|
|
|
+ return Meteor.subscribe('comments', this.params._id);
|
|
|
+ },
|
|
|
data: function () {
|
|
|
|
|
|
return Posts.findOne(this.params._id);
|