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

locals scope stopped working with EJS #46

Open
aarsilv opened this issue Jul 15, 2014 · 0 comments
Open

locals scope stopped working with EJS #46

aarsilv opened this issue Jul 15, 2014 · 0 comments

Comments

@aarsilv
Copy link

aarsilv commented Jul 15, 2014

All local variables used to be scoped to locals but now that is no longer the case as locals is undefined in EJS templates rendered via partial()

e.g. the following now throws an error:

parent template:

<%- partial('user', {name: 'Aaron'}) ->

user partial template:

<h1>Hello, <%= locals.name %></h1>
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