I am new to Pug and I am trying to generate a Select set of Options like this:
select
each variable in variables
option(value=variable.id) #{variable.var_name}
However the result I get, in the rendered page, is an empty select input followed by the list of options as text
I am new to Pug and I am trying to generate a Select set of Options like this:
select
each variable in variables
option(value=variable.id) #{variable.var_name}
However the result I get, in the rendered page, is an empty select input followed by the list of options as text
Share Improve this question edited Oct 25, 2016 at 5:26 Andrea Sindico asked Oct 24, 2016 at 19:44 Andrea SindicoAndrea Sindico 7,4407 gold badges49 silver badges87 bronze badges1 Answer
Reset to default 21Indents the code https://pugjs.org/language/iteration.html
select
each variable in variables
option(value=variable.id) #{variable.var_name}