I have a javascript object in my jade view:
element = { name: 'createdAt', type: 'text', attrs: { class: 'date', type: 'text', placeholder: 'Created at' } }
I would like to generate attributes on the input tag, try something like this
input( each k, v in element.attrs k= v )
Of course, this does not work, I also tried the inline code, but to no avail. Do you have an idea to help me?
source share