74
rated 0 times
[
77]
[
3]
/ answers: 1 / hits: 22764
/ 7 Years ago, mon, april 3, 2017, 12:00:00
How would I make a dynamic dropdown in vue, not sure what I am doing wrong.
in my html I have...
<div id=app>
<select v-model=selected>
<option disabled value=>Please select one</option>
<option v-for=item in selected></option>
</select>
and my js looks like....
new Vue({
el: '#app',
data: {
selected: [Apache, Cochise],
}
})
EDIT:
the values appear in the html DOM tree in the inspector
More From » dynamic