|
@@ -21,8 +21,8 @@ PostsListController = RouteController.extend({
|
|
limit: this.postsLimit()
|
|
limit: this.postsLimit()
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- waitOn: function () {
|
|
|
|
- return Meteor.subscribe('posts', this.findOptions());
|
|
|
|
|
|
+ subscriptions: function () {
|
|
|
|
+ this.postSub = Meteor.subscribe('posts', this.findOptions());
|
|
},
|
|
},
|
|
posts: function () {
|
|
posts: function () {
|
|
return Posts.find({}, this.findOptions());
|
|
return Posts.find({}, this.findOptions());
|
|
@@ -34,6 +34,7 @@ PostsListController = RouteController.extend({
|
|
});
|
|
});
|
|
return {
|
|
return {
|
|
posts: this.posts(),
|
|
posts: this.posts(),
|
|
|
|
+ ready: this.postSub.ready,
|
|
nextPath: hasMore ? nextPath : null
|
|
nextPath: hasMore ? nextPath : null
|
|
};
|
|
};
|
|
}
|
|
}
|