nodejs + HBS (handlebars) : passing data to partials
问题 I have a little question about HBS and partials : How can I pass data to a partial ? Suppose I have an index.html template which include a head.html partial. I have a code like this : server.js : var express = require('express'); var app = express(); var hbs = require('hbs'); hbs.registerPartials(__dirname + './views/partials'); app.set('view engine', 'html'); app.engine('html', hbs.__express); app.use(express.bodyParser()); app.get('/:item', function(req, res) { res.render('index',{title:"My