【发布时间】:2017-06-21 13:44:05
【问题描述】:
我正在为我的网络应用程序使用 express 4 - ejs 组合,我想知道如何根据被调用的路由/url 渲染多个文件。
假设我有 header.ejs 我想在每个页面上呈现,header.ejs 代码是:
<div class="wrapper">
<div class="header-area">Header IS Gonna Be Here</div>
<div class="content-area">Content Area Gonna Be Different on Every Page Depend on the Router</div>
</div>
我现有的调用 header.ejs 文件的方法是using res.render(),但我无法弄清楚同时渲染多个文件。谢谢你的回答,如果你觉得我的问题已经被问到了,可以给我链接吗,我去看看。
【问题讨论】: