is there any possibility to detect the completion of HTTP request in angular1 ?
product factory :
app
.factory('productFactory', ['$http','config',
function($http,config) {
var url = config.domainBase +':'+config.domainPort +config.additionalPath+'/Product/All'
return {
getAll: function() {
return $http.get(url);
}
};
}
]);
Product Controller :
var req = productFactory.getAllServers();
req.success(function(response) {
//....
}).
error(function(error){
//error
});