I have the below code snippet, which calls REST service to download CSV.
var link = document.createElement('a');
link.setAttribute('href',rest_URL);
document.body.appendChild(link);
link.click();
Now I am planning to show loading bar upon link click until CSV downloaded to the browser. How to do it??
I tried to use $http, but i don't want to show the content as object, then convert to CSV.
Is there any Angular feature available to monitor the link click, and trigger the event upon link action completed?.
I have loading bar code, just need help on getting the action complete event after the response returned from anchor tag above, not via $http.
Some Angular expertise would be greatly helpful.