I'm trying to connect a jade dropdown with the info that gets displayed in a table.
I'm using this dropdown:
label Car:
select(id="CarId", class="form-control", name="car_id")
option(value="0") All
each car, i in cars
option(value="#{car._id}") #{car.name}
And the table
table(class=['table','table-hover'])
thead
th Device
th Date
th In
th Out
th Edit
th Delete
tbody
each log, i in logs
//if car._id == log.car_id
tr
td #{log.device_id}
td #{log.log[0].datetime}
td #{log.log[0].in}
td #{log.log[0].out}
Is there a way to know wich car is selected so that the table only shows logs from a specific car?
How does this logic go into jade?
Aucun commentaire:
Enregistrer un commentaire