- var blog = { id: 1, title: 'test' }
p
a(href="/blog/#{blog.id}") #{blog.id} #{blog.title}
p
a(href="/blog/= blog.id")= blog.title
但结果为:
<p><a href="/blog/#{blog.id}">1 test</a></p>
<p><a href="/blog/= blog.id">1 test</a></p>
不科学啊
- var blog = { id: 1, title: 'test' }
p
a(href="/blog/" + blog.id) #{blog.id} #{blog.title}
以上。
请参考:
http://jade-lang.com/referenc...
http://jade-lang.com/referenc...