You can also use res.partial (), which is intended for partial allocation.
Here is an example of its use, where "browse.jade" is the name of the template:
exports.browse = function(req, res){ var Contact = mongoose.model('Contact'); Contact.where({}).asc('surname', 'given_name', 'org').run(function(err, results) { res.partial('browse', { locals: { data: results } }); }); };
source share