Reputation: 133
I have the following in my Jade view:
- var items = "one"
each item in items
div(id= #{items})
what I want is:
<div id="one"></div>
but Jade renders:
<div id="undefinedoneundefined"></div>
this is driving me crazy, I'm using Jade with Express.js.
BTW I've asked something similar but less clear, hope not to annoy anyone with my silliness.
Upvotes: 8
Views: 7847
Reputation: 64312
Something like this?
- var items = ["one", "two", "three"]
each item in items
div(id= item)
Upvotes: 18