vol4ok/hogan-express

Context is not being inherited

eneko89 opened this issue · 1 comments

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"...

Problem in your code, please, read express docs (do NOT use locals in second arg).