[Vuejs]-Vue.js conditionals

2👍

Lets keep all your links into an array say links[], add the following code in your html

<div v-if="links.length>1">

    // your code with condition

</div>
<div v-else>
   // else part if any
</div>

In vue part you need to add the array in the following way,

data: function () {
        return {

            links: [],  
      }
}

Leave a comment