Express.js View “globals”

后端 未结 7 1696
太阳男子
太阳男子 2020-12-24 01:16

I\'m using Express.js (on Node.js) and I know that you can render a view with custom data via the \"locals\" parameter. (res.render(\"template\", { locals: { foo: \"ba

7条回答
  •  孤城傲影
    2020-12-24 01:29

    I wound up looking into the source code, and I've actually found that this is now possible in never versions of Express. (so far, only available through GitHub)

提交回复
热议问题