AngularJS CSV File Download from API
问题 I have an admin control panel where admin users can set a few options and then click a button to run a report. The report should return a CSV file download prompt to the user. I am using ui-router and $resource services. The response headers/mime type are set correctly, but the CSV file is returned as text (no file download initiated) by the $resource handler. I tried creating the download link directly, by forming a querystring from the $scope , but unfortunately my API's authentication