Reputation: 419
I'm trying to set the value for each input inside a v-for
, but the value is not shown in the input. {{slideshow.timeout}}
is printing the value, but the v-model
is not working.
Am I missing something? I'm new to Vue.
<tr v-for="(slideshow, index) in slideshows">
<td>{{slideshow.timeout}}</td>
<td>
<input type="text" :model="slideshow.timeout" class="form-control">
</td>
</tr>
Upvotes: 1
Views: 32
Reputation: 1
Try this out:
<input type="text" v-model="slideshows[index].timeout" class="form-control">
since v-model
is a directive et it's not a bound attribute
Upvotes: 1