Vue.js v-repeat not working

I am trying to follow the Vue.js manual, but the code for the first lesson does not work for v-repeat. I am trying to display data in a task object:

<div id="tasks">
    <div>
        <h1>Tasks</h1>
        <ul class="list-group">
            <li v-repeat="task: tasks">
                {{ task.body }}
            </li>
        </ul>
    </div>
</div>
<script>
    new Vue ({
        el: '#tasks',
        data: {
            tasks: [

                { body: 'Go to store', completed: false }
            ]
        }
    })
</script>
+4
source share
1 answer
<li v-for="task in tasks">

v-repeat deprecated in 1.0:

https://github.com/vuejs/vue/issues/1200

+7
source

Source: https://habr.com/ru/post/1623633/


All Articles