Search code examples
meteormeteor-blazeflow-router

Meteor - FlowRouter - Blank pages


Hey guys I'm doing a tutorial on extending the users class, Link to the tutorial1 In every path I try, i always get a blank page, and i'm not understanding why. Any help would be appreciated. This is my routes.js file:

FlowRouter.route('/', {
   name: 'home',
   action: function() {
   BlazeLayout.render("mainLayout", {
      content: "home"
   });
  }
});
FlowRouter.route('/login', {
   name: 'login',
   action: function() {
   BlazeLayout.render("mainLayout", {
      content: "login"
   });
  }
});
FlowRouter.route('/register', {
   name: 'register',
   action: function() {
   BlazeLayout.render("mainLayout", {
      content: "register"
   });
  }
});

And this is my main-layout.html

<template name="mainLayout">
    {{>Template.dynamic template=content}}
</template>

Here is a link to my repo: https://bitbucket.org/mmrj9/hubapp/src


Solution

  • It's some other issues on the pages that cause the problems. The use of flow-router is fine. They renders well with static HTML nodes.

    Say, the reduced version of your home page,

    <template name="home">
        Home Page.
    </template>
    

    , render the string on the client side as expected.

    Would not make a list of the issues here, but hope this sheds some light on it for you to get going.