[Vuejs]-Vue iterating array from particular index to particular index

4👍

Use computed properties for example

in your component

computed:{
    partObject(){
      return this.objects.slice(30,61);
    }
  }

now in your component template you iterate over this computed prop

 <li v-for="item of partObject">
        {{item}}
      </li>

0👍

You could use a v-for to iterate over the indexes and then print the corresponding elements.

Something like this

<div v-for="index in 30">{{objects[index+30]}}</div>

Leave a comment