block content
h1= title
p Welcome to Todo
a(href='/tasks/new') 新增
- if(docs.length)
table
tr
th Task
each task in docs
tr
td
a(href='/tasks/edit/#{task.id}') #{task.task}
a(href='/tasks/delete/#{task.id}') 删除
- else
p You don't have any tasks!
我想大声告诉你2017-05-19 10:49:26
jade
模版也得在第一次生成的时候拿到 docs
这个变量的内容才能生成 html
.
This code unless docs
是静态的,否则怎么也写不成万能的 html
,只能根据特定的 docs
写特定的 html
某草草2017-05-19 10:49:26
You can put some static data on it first and then use the jade_to_html URL to jade
转换成 html
.