【发布时间】:2014-11-24 13:20:48
【问题描述】:
不知道我在这里做错了什么..
questions.js
questions = [];
questions.AA = 'First'
questions.BB = 'Second'
questions.CC = 'Third'
res.render('questions', { title: questions[CC], questions: questions });
questions.jade
extends layout
block content
h1= title
p #{questions.CC}
each question in questions
p= question
渲染
<body>
<h1>Third</h1>
<p>Third</p>
</body>
所以
each question in questions
p= question
似乎没有像我预期的那样工作。我错过了什么?
【问题讨论】:
标签: javascript node.js express pug