Context is not being inherited
eneko89 opened this issue · 1 comments
eneko89 commented
I thought that hogan.js was inheriting parent context on rendering, I mean:
view:
{{#list}}
{{foo}}
{{bar}}
{{/list}}
rendering;
res.locals.bar = "asdfghj";
res.render("view", { locals: { list: [ {foo: 1}, {foo: 2} ] } } );
But "bar" is not beeing accessed inside "list"...
vol4ok commented
Problem in your code, please, read express docs (do NOT use locals
in second arg).