0
我正在使用express 4 - ejs组合为我的web应用程序,我想知道如何渲染多个文件取决于被调用的路由/ url。快速呼叫多个文件 - EJS
比方说,我有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()
但我不能找出它同时呈现多个文件。谢谢你的回答,如果你觉得我的问题已经被问到了,你可以给我链接,然后我会检查出来。
以及如何区分,包括不同的路线上的文件吗? – myd07
检查更新的答案。 –
谢谢,它的工作 – myd07