My Meteor application seems to be working fine but I’m wondering why the browser console keeps reporting this error:
Error: No Iron.Layout found so you can't use yield!
lib/router.js
Router.configure({
layoutTemplate: 'application_layout'
});
Router.onBeforeAction(function () {
if (!Meteor.userId()) {
// If the user is not logged in, render the login template.
this.render('login', {to: 'login'});
} else {
this.next();
}
});
client/application_layout.html
<template name="application_layout">
{{#if currentUser}}
<div class="col-xs-2">left column</div>
<div class="col-xs-8">{{> yield}}</div>
<div class="col-xs-2">right column</div>
{{else}}
{{> yield "login"}}
{{/if}}
</template>