Before I get to the main problem, I anticipate someone is going to ask what version of iron:router are you running.
I believe I am currently on the latest version of Meteor because when I enter iron update iron:router it displays, "Your packages are at their latest compatible versions.".
However when I enter iron show iron:router it displays 1.0.8 June 1st, 2015 1.0.9 June 2nd, 2015 installed 1.0.10 October 6th, 2015 1.0.11 October 9th, 2015 1.0.12 October 9th, 2015
as if version 1.0.9 is installed...so not sure how to remedy this situation or how this affects the main problem.
The main problem is that when I go to go my default localhost:3000/ it displays a blank white page...It should be rendering my 'Home' template and my code is displayed below. If anyone has any insight into why a blank page is being rendered and can lend some assistance that would be great.
Here is my code:
Router.route('/', function () {
this.render('Home');
});
Router.configure({
layoutTemplate: 'Home',
loadingTemplate: 'Loading',
notFoundTemplate: 'NotFound'
});
You're trying to render Home
into Home
. When you have a layoutTemplate
it normally contains a {{> yield}}
which then gets replaced with whatever template you are actually rendering. Try:
html:
<template name="layout">
... whatever you need on every layout, ex: header
{{> yield }}
... things like your footer
</template>
js:
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'Loading',
notFoundTemplate: 'NotFound'
});