pug - How to use Meteor with Jade, Flow Router and Blaze? -
i'm trying make jade work meteor's flow router , blaze. somehow doesn't work me. i'm pretty sure it's small don't notice.
html versions of home.jade , layout.jade files give proper, working result.
according this, there used problem, solved in 0.2.9 release of mquandalle:jade.
$ meteor list
blaze 2.1.2 meteor reactive templating library kadira:blaze-layout 2.0.0 layout manager blaze (works flowrou... kadira:flow-router 2.3.0 designed client side router meteor meteor-platform 1.2.2 include 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 working!
routes.js
flowrouter.route('/', { name: 'home', action: function() { blazelayout.render('layout', {main: 'home'}); } });
the result:
<body> <div id="__blaze-root"> </div> </body>
indeed, subtle detail issue: should not use quotes around main
parameter in layout template:
template(name="layout") +template.dynamic(template=main)
Comments
Post a Comment