开发者

Multiple attributes with one attribute using js variable

开发者 https://www.devze.com 2023-04-07 15:03 出处:网络
Hello I am having problems with Jade and Node.JS I have the following code in my template: - var css = assets.get(\'css\')

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

精彩评论

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