Closed odaper closed 1 year ago
EJS by default uses with
to set locally scoped versions of the variables you pass. If you want to use the locals
object, you need to set the _with
option to false
. See the docs here: https://ejs.co/
Many thanks @mde
Hello
I'm using the locals to access the variables passed to my ejs templates using yeoman v4 and ejs v2.7, for example:
<% const myParam = locals.myParam; %>
When I upgraded the ejs to the v3.1.7, the locals variables is no more defined.How can we solve this issue? the locals is no more defined in ejs v3?
Thanks for your help