Best way to link to pages within the app?

Having this problem with embedding content in my app. When the user first goes on to the URL,everything works fine. But if a user clicks on the nav links and goes to a page within the app, the order of the data(call them posts) are messed up and the embedded content doesnt load. But if a user then manually presses refresh, then the page loads as it should.

The problem appears mostly when its between pages that use the same templates. So if the app loads a different template, then goes back to the first one, the posts are arranged normally.

My router.js looks like this.

loadingTemplate: ‘loading’,
waitOn: function() { return Meteor.subscribe(‘posts’); }

PostsListController = RouteController.extend({
template: ‘main’,
increment: 30,
postsLimit: function() {
return parseInt(this.params.postsLimit) || this.increment;
findOptions: function() {
return {sort: this.sort, limit: this.postsLimit()};
subscriptions: function() {
this.postsSub = Meteor.subscribe(‘posts’, this.findOptions());
patterns: function() {
return Posts.find({}, this.findOptions());
data: function() {
var self = this;
return {
posts: self.patterns(),
ready: self.postsSub.ready,
nextPath: function() {
if (self.patterns().count() === self.postsLimit())
return self.nextPath();

NewPostsListController = PostsListController.extend({
sort: {submitted: -1, _id: -1},
nextPath: function() {
return Router.routes.newPosts.path({postsLimit: this.postsLimit() + this.increment})

Router.route(’/new/:postsLimit?’, {
name: ‘newPosts’,
controller: NewPostsListController



Also tried.


Also tried using an event handler to load the pages when clicked on.

Anyway to load the pages within the app, the same as the user loads the URL the first time?