Open custa1200 opened 8 years ago
When I used the handlebars (hbs) that ships with ExpressJS I just had to add the following to my app.js
hbs.localsAsTemplateData(app);
But if I add that using handlebars-express it causes an error.
This is an absolute show stopper for using Express Handlebars and judging by same issue in #136 being around for almost 6 months it's very concerning. Is there any known workaround for this? otherwise I am going to have to go back to the builtin handlebars. :(
Locals don't require the @ symbol.
This deviates from the way the shipping handlebars (hbs) handles app.locals.x and quite clearly causes confusion. I don't think this is a good pattern.
https://github.com/donpark/hbs#exposing-locals-as-template-data
Hi the following that I have set in app.js do not seem to be available to my templates since I switched to express-handlebars
This is an example of siteTitle that I have in a handlebars template in my site.
If I just do a console.log underneath where they are assigned the correct value gets put to the console, so it is reading them into the locals fine.