I am attempting to iterate through an array from a Vue component without reapeating the element on which I call 'v-for'. I have not found a subsitute for 'v-for' in the official docs API, nor in articles online.
I have this:
<div v-for="(item, index) in items">
<foo :index="index">
<foo/>
</div>
Want this:
<foo :index="0"><foo/>
<foo :index="1"><foo/>
<foo :index="2"><foo/>
//etc...
And have tried this, which does not work:
<foo v-for="(item, index) in items":index="index">
<foo/>
Help is much appreciated! Started coding with Vue.js yesterday.