问题
Does jade is able to do following, combine static html list with dynamic anchor list from server side.
ul
li
a(href='/') Home
if data.links
each link, i in data.links
li
a(href='' + link.url)= link.title
回答1:
Yes. You're just using the wrong indentation and format:
ul
li
a(href="/") Home
if data.links
each link, i in data.links
li
a(href=link.url) #{link.title}
来源:https://stackoverflow.com/questions/33961655/jade-static-anchor-link-with-dynamic-link-data-from-server-side