Routing to home screen when not signed in
问题 I want to redirect all users to a home page if they are not logged in. Currently I am doing this: Router.onBeforeAction(function() { this.render('loading'); if (! Meteor.userId()) { this.render('Home'); } else { this.next(); } }); Which I saw online, but this seems to be prevent my 'loading' template from ever showing and instead shows the default Loading... in the top left of the screen. If I change this.render('Home'); to this.redirect('/') I see the correct loading template. However in the