In mounted
function i create an action which fetch
data from Rest Api to my table in vuejs componeny
mounted() {
UserService.getProjects().then(
(response) => {
this.isProject = true;
this.projects = response.data;
},
(error) => {
this.isProject = false;
}
);
}
but, when i click on my menu on route to this page, I'm redirected to this page in one second, but my data is still loading and at the beginning i have an empty table..., how to fetch data and then redirect to this page? thanks for any help
ps. i use router-link
to navigate to another page