Can't put id on div from jade variable

My Jade view has the following:

- var items = "one" each item in items div(id= #{items}) 

I want:

 <div id="one"></div> 

but jade displays:

 <div id="undefinedoneundefined"></div> 

It drives me crazy, I use Jade with Express.js.

By the way, I asked something similar, but less clear, I hope that no one will annoy my stupidity.

+7
source share
1 answer

Something like that?

 - var items = ["one", "two", "three"] each item in items div(id= item) 
+18
source

All Articles