0
I am using PUG template in Nodejs and I am looking in the documentation how to assemble a table. I am checking in "pugjs.org", but apparently there is... Does anyone know how to mount a table with PUG?
0
I am using PUG template in Nodejs and I am looking in the documentation how to assemble a table. I am checking in "pugjs.org", but apparently there is... Does anyone know how to mount a table with PUG?
1
do as with other parameters
table.table
thead
tr
th Exemplo
th Exemplo2
tbody
tr
td
td
tr
td
....
If you want to do it with dynamic data, use each.
table.table(class=type)
thead
tr
each head, i in header
th #{head}
tbody
each row,j in data
tr
each col,k in row
td #{col}
Browser other questions tagged node.js pug
You are not signed in. Login or sign up in order to post.
Gabriel, thank you for the information. The first example worked without problems, but I need your second example, that is, dynamically. One of the problems I’m having is how to dynamically define "colspan" and "rowspan", for example. Could you share the documentation link about Tables in the PUG? I’m really not finding it in "pugjs.org".
– wBB