How to use Meteor with Jade, Flow Router and Blaze?

I'm trying to get Jade to work with the Meteor Flow Router and Blaze. For some reason, this does not work for me. I am pretty sure that this is something small that I don’t notice.

The HTML versions of the home.jade and layout.jade files give the correct working result.

According to this , there was a problem, but it was resolved in version 0.2.9 of mquandalle: jade.

$ meteor list

blaze 2.1.2 Meteor Reactive Templating library kadira:blaze-layout 2.0.0 Layout Manager for Blaze (works well with FlowRou... kadira:flow-router 2.3.0 Carefully Designed Client Side Router for Meteor meteor-platform 1.2.2 Include a standard set of Meteor packages in your... mquandalle:jade 0.4.3 Jade template language 

layout.jade

 template(name="layout") +Template.dynamic(template="main") 

home.jade

 template(name="home") p Looks like working! 

routes.js

 FlowRouter.route('/', { name: 'home', action: function() { BlazeLayout.render('layout', {main: 'home'}); } }); 

Result:

 <body> <div id="__blaze-root"> </div> </body> 
+5
source share
1 answer

In fact, this is just a subtle problem: you should not use quotation marks around the main parameter in the layout template:

 template(name="layout") +Template.dynamic(template=main) 
+5
source

All Articles