【发布时间】:2012-01-28 19:58:37
【问题描述】:
我有以下layout.jade:
!!!
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body!= body
在正文中,我想包含另一个文件 content.jade 的内容。
我正在 app.js 中尝试这样的事情:
app.get('/test', function(req, res){
res.render('layout', {
layout: false,
body: include content.jade
});
});
但它给出了 SyntaxError: Unexpected identifier at 'content'。有没有办法做到这一点?
【问题讨论】:
标签: node.js include express pug