Hi everyone,
I’m having an issue with my app : each time I refresh the page or do a document.location.reload()
, it goes back to the home page, the base url, the '/'
.
I’m using Flow Router, BlazeLayout and Meteor 1.4.1.2
I can give you my route file :
if (Meteor.isClient) {
Accounts.onLogin(function(){
FlowRouter.go('home');
});
Accounts.onLogout(function(){
FlowRouter.go('login');
});
};
FlowRouter.triggers.enter([function(context, redirect) {
if(!Meteor.userId()) {
FlowRouter.go('login');
}
}]);
FlowRouter.route('/userSettings', {
name: 'userSettings',
action() {
BlazeLayout.render('SettingsLayout', {main: 'userSettings'});
},
});
FlowRouter.route('/migrationSettings', {
name: 'migrationSettings',
action() {
BlazeLayout.render('SettingsLayout', {main: 'migrationSettings'});
},
});
FlowRouter.route('/waves', {
name: 'waves',
action() {
BlazeLayout.render('HomeLayout', {main: 'Labels'});
},
});
FlowRouter.route('/createBatch/:step/:id', {
name: 'createBatch',
action() {
BlazeLayout.render('HomeLayout', {main: 'CreateBatch'});
},
});
FlowRouter.route('/createBatch/:step/', {
name: 'createBatch',
action() {
BlazeLayout.render('HomeLayout', {main: 'CreateBatch'});
},
});
FlowRouter.route('/', {
name: 'home',
action() {
// if(Meteor.userId()) {
// FlowRouter.go('/')
// }
BlazeLayout.render('HomeLayout', {main: 'Devices'});
},
});
FlowRouter.route('/login', {
name: 'login',
action() {
BlazeLayout.render('loginPage');
},
});
Thank you guys