I use an ionic structure. I have several HTTP services that work fine. Now the problem is that whenever I get a response to any HTTP call. I can’t move on.
Is it possible to start the HTTP service as a background process. Therefore, my application continues to work without waiting for the result.
here is my code
articleService.getArticles().then(function() {
},function(err){
});
and sercvice code
$http({
url: "http://myservice.com",
data: { user_id: 1 },
method: 'POST',
withCredentials: true,
}).success(function (data) {
deferred.resolve(data);
}).error(function (err) {
deferred.resolve(0);
})
return deferred.promise;
}
Any idea? Do I need a solution in the ionic structure that will work for both ios and andriod?
thank
source
share