Todat I am stuck with looping in Vue. I know the basics of loops and been looking around if these question are asked before. But none of them solved my problem.
Code loop:
<ul>
<li :v-for="todo in todos">
{{ todo.text }}
</li>
</ul>
Code object:
todos: [
{ text: "Subscibe to Renatello.com newsletter", done: true },
{ text: "Learn Vue", done: false },
{ text: "Build awesome projects", done: false }
]
The error I get is: Cannot read property 'text' of undefined
Hopefully there is someone out here which can help me out.
SOLUTION:
The :v-for: as v-for="(todo, index) in todos" with an :key="index"
Thanks in advance.
[<>]toolbar button); here's how to do one and specifically, here's how to do one for Vue.