Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to access res.locals from hjs templates #7

Closed
steveliles opened this issue Nov 27, 2013 · 1 comment
Closed

unable to access res.locals from hjs templates #7

steveliles opened this issue Nov 27, 2013 · 1 comment

Comments

@steveliles
Copy link

I initially raised this against expressjs, but the guys there indicate it might be a problem with hjs - expressjs/express#1833

The problem is that expressjs makes res.locals available to view engines as a function, so given locals like { name: "steve" }, simply writing {{name}} in a hjs template does not produce the expected result. Possibly I could invoke it as a lambda? I'm not sure - i'm new to this - but even if I could that's inconvenient (and libraries like connect-cachify don't work because of this problem).

@steveliles
Copy link
Author

My bad - looks like this was actually an issue in expressjs 3.4.0, updating to 3.4.5 has (mostly) resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant