I have an angularjs application that has an export feature. Export generates a file dynamically server side. The generation of this file could be seconds to minutes. I would like to be able to give the user some sort of status that the server is generating the file. Even if its just a spinner on the page letting the user know something is happening.
My problem however is this. I am not making a 'GET' request as a resource in angular. I am just setting:
window.location.href
to point at the url on the server that will start the file generation an send it back to the client.
This means that if the file takes 1 minute to generate the download dialog for the browser does not pop up until that minute passes and the file is ready to download.
Is there a way to make a GET request for file download and then get a callback when the get request was successful?