I tried this code with no success
$http({
method:"GET",
url:"data/mycooljsonfile.json",
eventHandlers:{
onprogress:function(event){
console.log("progress");
console.log(event);
},onreadystatechange:function(event){
console.log("change");
console.log(event);
}
},
uploadEventHandlers:{
onprogress:function(object){
console.log(object);
}
}
})
.success(function(json){ // succès
$scope.lemmes=json;
//console.log($http);
}).error(function(error){ // erreur
console.log(error);
});
I checked here :
https://docs.angularjs.org/api/ng/service/$http
and there :
https://www.w3.org/TR/XMLHttpRequest/#events
It is just that I would like to improve my code with a progress bar on a big json file download to the app.
By the way, I could not find a way to log the overall $http object's functions and supported events as it returns a promise object with few info.