I'm receiving an error with Iron Router 0.7.0 on Meteor 0.8.0.
Within the UI.Compenent.lookup function in blaze-layout's layout.js, the following error is triggering:
Uncaught Error: Couldn't find a Layout component in the rendered component tree
It's hard to know exactly what is causing this error and what isn't working because of it. Any ideas?
Thanks in advance.
I just got the same error, for me it was caused by including my layout template within <body>
, and specifying it as the layoutTemplate
option. To fix it, I removed the include from <body>
.
Here is a before and after of my code;
example.html (before)
<head>
<title>example</title>
</head>
<body>
{{>layout}}
</body>
<template name="layout">
<div>{{>yield}}</div>
</template>
example.js (before)
if(Meteor.isClient) {
Router.configure({
layoutTemplate: 'layout'
});
}
example.html (after)
<head>
<title>example</title>
</head>
<body>
</body>
<template name="layout">
<div>{{>yield}}</div>
</template>
example.js (after -- same as before)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With