Howdy folks, I have something like this running.
If I console.log(“This page was rendered”); it ends up display 5 times!
Shouldn’t it only load once? This is going to end up costing a lot of collection subscriptions, wont it?
SCREENSHOT: http://prnt.sc/eqi29z
Router.route('/groups/manage/:groupId',{
data:function(){
if( !Meteor.user()){
Router.go('/');
}
},
waitOn: function(){
if( Router.current().params.groupId != "" ){
Meteor.subscribe('posts', 'group_by_id', Router.current().params.groupId );
}
},
template:'screen',
yieldTemplates: {
'groups_manager': {to: 'content'},
}
});
Interesting note that I briefly see the home page at / as defined on Router.go(’/’); and then it brings me in to the correct page when I CTRL+S and Meteor restarts. It’s super weird.
What am I missing?
This happens on ALL Iron-Router templates in the project (30).