-- header.jade
ul
li
a User = #{userName}
-- layout.jade
doctype html
html
head
title= title
body
include header
include index
-- route file: index.js
router.get('/', function(req, res, next) {
res.render('index', {
userName: 'Jane Doe'
});
});
how to get the userName value in header jade template which is included in the layout.jade file. i am trying to implement a common header concept for my project.
Any help would be highly appreciated! TIA