Answer the question
In order to leave comments, you need to log in
How to make asynchronous ajax in Vuex?
There is a method in which ajax, the question is how to make it asynchronous?
this.$http.get(url).then(function(response){
thiss.trackdata = response.body;
thiss.trackSaveStatus(o.track, response.body);
thiss._loading(false);
if(callback){
callback();
}
}, function(response){
thiss._loading(false);
});
Answer the question
In order to leave comments, you need to log in
I'm ready now. Asynchronous. .then
- Promise result. A $http.get
- returns a promise that will be executed asynchronously
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question