consolidate.js icon indicating copy to clipboard operation
consolidate.js copied to clipboard

How to make res.locals work

Open cyberwombat opened this issue 13 years ago • 1 comments

So in Express3 without consolidate I can access locals within my template without explicitly passing each in my route. Now with consolidate (and swig) this no longer works. I use locals a lot in middleware and I would prefer not to have to pass each of these variables explicitly to my template. Is this intentional, bug, something about swig?

cyberwombat avatar Sep 07 '12 17:09 cyberwombat

hmm must be something with swig, maybe we're not passing locals to it properly here, though the tests pass

tj avatar Sep 07 '12 20:09 tj