express-hogan.js
express-hogan.js copied to clipboard
need docs about how to use partials
I have my index.mustache
including a partial tag {{> form}}
and the partial is put under the same path.
However, the partial doesn't load at all.
There is not enough doc in the testapp.js
to indicate correct usage of partials, would you help in this case?
I use the following code to render the template:
app.get('/', function (req, res) {
res.render('home');
})
Try to look at testapp-partials.js
Hi Dundee, does wrapping the routes with expressHogan.preparePartials
the only way to activate partials support?
Hi, I am afraid it is right now. You need to parse them in advance.
I see. Are you still using in production? I found it is hard to keep the code clean with it.
杨晨昀 Steven Yang / Designer and Web Developer blog.yangchenyun.com
On Tuesday, July 17, 2012 at 4:26 PM, Daniel Milde wrote:
Hi, I am afraid it is right now. You need to parse them in advance.
Reply to this email directly or view it on GitHub: https://github.com/Dundee/express-hogan.js/issues/8#issuecomment-7029401
You can decompose the routes setup to separate function or so to clean it up a bit.