This has been driving me nuts all morning. (Forgive me, I'm new to meteor.) I have a fairly simple setup, following the habits described in Discover Meteor.
First, lib/router.js:
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {name: 'home'});
Router.route('profile', {name: 'UserProfile'});
Second, layout.html:
<template name="layout">
<div class="container">
{{> navbar}}
<div id="main">
{{> yield}}
</div>
</div>
</template>
And finally, client/templates/users/user_profile.html:
<template name="UserProfile">
<p>hello world</p>
</template>
If I place {{> userProfile}} in the layout it renders fine. But the Router will not do the deed for me, as it ought.
What am I missing ?
I was having this issue too... You didn't post your console output, but here was my solution (I answered my own question):
How to use yield and Iron-router?
In short this solved it for me: meteor add ejson