- var items = [
{
name: '英雄联盟',
url: '/lol'
}
];
#sidebar-wrapper
ul.sidebar-nav
each item in items
li
a(href='#')= item.name
Error: /Users/Dave/study/live-streaming-crawler/views/sidebar.jade:2
1| - var items = [
2| {
3| name: '英雄联盟', 4| url: '/lol' 5| }
unexpected text {
怎么样才能正常的多行声明变量呢?写在一行里有点奇怪
写成这样就行了:
如果你嫌这样也难看,那还能写成这样: