【发布时间】:2013-06-20 13:48:48
【问题描述】:
我正在尝试使用玉。我正在尝试在获取请求中呈现模板,我的代码是
app.get('/promocode/generate-promocode',mw.authenticate,function(req,res)
{ res.render('index1', {});
});
我的 layout.jade 文件代码是
doctype 5
html
head
block head
title= title
include layout/css
include layout/headerjs
body
include header/main
include layout/topbar
.middle-content
.container
.wrapper
block content
include footer/main
include layout/footerjs
而我的 index.jade 文件代码是
extends layout
h1 Welcome to Marketplace
h1 Welcome to Marketplace
h1 Welcome to Marketplace
h1 Welcome to Marketplace
h1 Welcome to Marketplace
h1 Welcome to Marketplace
当我转到页面时,它只显示 layout.jade 语法没有 h1 标题,内容为“欢迎来到市场”。有什么建议如何在 html 页面中显示这个标题标签??
【问题讨论】:
标签: javascript node.js pug