Answer the question
In order to leave comments, you need to log in
How to fill an array in vue before html code is executed?
Good day. Help with a question. Is it possible to fill an array using a json file using axios.get, but at the same time, so that it is filled before the html code starts executing in the template part ?
This is what I need so that my slider is filled with values from an already existing array. If it fills up later, then why do the slides load crookedly. So I hope for your help :pray:
the function itself
Get_active_goals: function(){
axios
.get('https://jsonapi.org/alt-favicons/manifest.json')
.then(response => (this.active_goal = response.data.icons));
console.log(this.response);
},
<template>
...
<b><div v-for="ag in active_goal" class="mycarousel_main" >
...
</div></b>
...
</template>
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