开发者

Multiple attributes with one attribute using js variable

Hello I am having problems with Jade and Node.JS

I have the following code in my template:

- var css = assets.get('css')
each path in css
  link(rel="stylesheet" href=path)

It gives me the following error: SyntaxError: Unexpec开发者_如何转开发ted identifier

But If I do the following

- var css = assets.get('css')
each path in css
  link(href=path)

It seems to work, what am I doing wrong? Any help is greatly appreciated! :)


You're missing a comma:

link(rel="stylesheet", href=path)
//           here ---^
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜