0👍
First of all I think your use of v-for is incorrect…as per https://v2.vuejs.org/v2/guide/list.html and this example:
<ul id="v-for-object" class="demo">
<li v-for="value in object">
{{ value }}
</li>
</ul>
I think you should say v-for="profile in items" and not "items in profile" . As for the get(), it is possible that you have a similar problem that I had recently where a similar method (fetch()) was returning promises that I had to wait before i tried to use…so perhaps when you do:
.then((response) => {
this.profile = response.data.value;
})
Are you sure that response.data is available immediately? Perhaps the server takes some time to answer and the code is already trying to assign response.data.value but it’s not ready yet. The way my problem was solved for the fetch() property was adding a wait for the two promises, one for the main response and the other for the body of the response. Maybe it is related:
fetch(...)
.then ( response => Promise.all([response,response.json()]) )
.then ( ([response,body]) => { ... } )
- [Vuejs]-Default select option to first index when populating via array from Vuex store in Vue Component
- [Vuejs]-Vue & Vue Route how to make an image blur when the route begin?