Home » vue » Vue js v-repeat not showing anything

Vue js v-repeat not showing anything

Posted by: admin November 26, 2021 Leave a comment


I am totally new to vue.js. I am trying to repeat a simple list but its not showing anything. My code is

        <title>VUE Series</title>
        <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <div class="container">
            <div id="tasks">
                    <ul class="list-group">
                        <li v-repeat="tasks"> {{ $value }} </li>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.28/vue.min.js"></script>
        <script src="app.js"></script>

and app.js file is :

new Vue({
    el : '#tasks',

    data : {
        tasks : ['Assam', 'Manipur', 'Meghalaya']

Fiddle link is FIDDLE


You should use v-for instead of v-repeat and the syntax should be v-for="task in tasks"and you use taskto reference the current task.