1👍
I’m not strong on Vue, but I don’t think you want the :
on :v-for
, just v-for
:
const app = new Vue({
el: '#app',
data: {
todos: [
{
text: "Subscibe to Renatello.com newsletter",
done: true
},
{
text: "Learn Vue",
done: false
},
{
text: "Build awesome projects",
done: false
}
]
}
})
setTimeout(() => {
app.todos = [
...app.todos,
{
text: "more",
done: false
}
];
}, 1000);
<div id="app">
<ul>
<li v-for="todo in todos">
{{ todo.text }}
</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
- [Vuejs]-Vuejs register component and getting did you register the component correctly? error
- [Vuejs]-Vue js – making a style to be inherited by children components
Source:stackexchange.com