Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue.js v-repeat not working

I'm trying to follow a tutorial on Vue.js, but the code for the first lesson isn't working for v-repeat. I'm trying to display the data in the tasks 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>
like image 379
Mike Avatar asked Jan 10 '16 07:01

Mike


1 Answers

<li v-for="task in tasks">

v-repeat was deprecated in 1.0:

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

like image 130
Mike Avatar answered Oct 02 '22 13:10

Mike