I need to display progress bar with percentages while document is generating. Document generating - POST request. I am trying to use this code
$http({
method: 'POST',
url: config.apiUrl + "/RevDoc/GenerateDocument",
data: model,
eventHandlers: {
progress: function (e) {
console.log(e);
if (e.lengthComputable) {
progress = Math.round(e.loaded * 100 / e.total);
console.log("progress: " + progress + "%");
if (e.loaded = e.total) {
console.log("File upload finished!");
}
}
}
},
}).then((response) => {
console.log(response);
})
but it doesn't work for me. I don't even get into the progress function.
"angular": "^1.5.8".