Access data from res.locals in express handlebars partials

Viewed 16

I was wondering if I am about to access res.locals data from within handlebars partials. I am using express-handlebars and setting data like res.locals.user which I can access everywhere else in the files. Just doenst work for partials

I am starting to use partials around my site and it would be very handy to not have to pass data from session and user etc... every time

I have tried accessing like {{user}} and {{../user}} but neither work.

Couldn't find anything under their docs but if there's anything I'm missing, please let me know :)

0 Answers
Related