right now, my function looks like this
scope.downloadCsv = function(){
$http.({
method:'POST',
url:'php/crud.php',
data:scope.postPayload,
headers:{'content-type':'application/x-www-form-urlencoded'}
}).success(function(){console.log("download done!")});
};
I've tried binding that button to an ng-click, ng-submit, and following the instructions on Download text/csv content as files from server in Angular (which works, but not on Firefox).
I don't know the technical term, but I'm assuming I somehow needs to be able to click on a link with a "POST" request, that way the browser thinks it's not an ASYNC call, I just don't know how to accomplish it. It has to be a post because I'm passing a bunch of data to the server to operate on to generate the CSV. Any help is GREATLY Appreciated!