假设我的对象data
定义如下:
res.render('index', {
data: 'Line one\nLine two' });
如何在html中正确呈现其值(通过使用Jade作为模板引擎)将文本分成两行?
注意:使用\<br\>
代替\n
,它仍然无效。
答案 0 :(得分:0)
试试这个
res.render('index', {
data: 'Line one <br/> Line two'
})
并在index.jade
中 != data