Answer the question
In order to leave comments, you need to log in
how to use array in jade?
I want to make a menu. Everything looks like this
mixin menu-footer(...items)
+b.menu-footer&attributes(attributes)
+e('ul').menu
each item in items
+e('li')(class='item-' + item.itemclass)
a.menu-item(href=item.refs)=item.name
+menu-footer({itemclass:'search',refs:'#', name:'Search'})
+menu-footer( [ {itemclass:'search', {refs:'#', name:'Search'} ] )
Answer the question
In order to leave comments, you need to log in
I'm not sure if I understood the question correctly, but look at this example https://codepen.io/perfectpixel/pen/EbmgEL it might help...
or here's How to add a class to jade (in a loop)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question