Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let first_time = false;
- Tracker.autorun(() => {
- Meteor.userId();
- if(first_time)
- FlowRouter.reload();
- else
- first_time = true;
- });
- FlowRouter.route(States.home,{
- triggersEnter: [(context, redirect) => {
- if(!Meteor.userId())
- redirect(States.login);
- }],
- action(params,queryParams){
- BlazeLayout.render('SimpleLayout', { content: "App"});
- }
- });
- FlowRouter.route(States.login,{
- action(params,queryParams){
- BlazeLayout.render('SimpleLayout', { content: "Login"});
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement