[Vuejs]-Vue.js – changing elements when I don't know how many there will be

0πŸ‘

It ends up looking something like this:

javascript part of vue:

data:{
  posts:[] // all of your posts as a JSON object...
}
methods:{
  myMethod:function(){...}
}

html:

<div @click="myMethod" v-for="(p,index) in posts" :key="index">

Leave a comment