Answer the question
In order to leave comments, you need to log in
How to select each object from an array and number links from it?
I make a request to swapi.co and get an array results consisting of a bunch of unnumbered objects with no id.
asyncData ({ req, params }) {
return axios.get('http://swapi.co/api/people/')
.then((res) => {
return { people: res.data.results }
})
}
<li v-for="person in people">
<nuxt-link :to="{ name: 'user-user', params: { user: СЮДА } }">LINK</nuxt-link>
</li>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question