We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using ect with express. Is it possible to access req.session inside a template? <%- req.session.user %> or <%- @req.session.user %>
<%- req.session.user %>
<%- @req.session.user %>
The text was updated successfully, but these errors were encountered:
I can't access ANY locals var inside template.
Ok, now I see: #34 so it's known issue apparently
Sorry, something went wrong.
@igorkova you just need to prefix all locals inside a template with @.
It's express question. You can access it trough locals:
app.use(function(req, res, next) { res.locals.req = req; return next(); });
But you probably do not need all req, so you can pass whatever you want. Look trough express issue if will have any troubles with session.
req
No branches or pull requests
I'm using ect with express.
Is it possible to access req.session inside a template?
<%- req.session.user %>
or<%- @req.session.user %>
The text was updated successfully, but these errors were encountered: