I've got an array as below:
return {
items: [
{active: true, text: 'text1'},
{active: true, text: 'text2'},
{active: true, text: 'text3'},
{active: true, text: 'text4'},
{active: true, text: 'text5'}
...
]
}
I want to iterate it in the DOM using v-for (easy) but I want to iterate them in two templates - first 3 elements of the array in template1 and the rest of elements in template2:
template1:
<template v-for="item in items">
first 3 elements:
{{item}}
</template>
template2:
<template v-for="item in items">
the rest of elements:
{{item}}
</template>
How should I modify my v-for to make this work?