AngularJS: download pdf file from the server
- by Bartosz Bialecki
I want to download a pdf file from the web server using $http. I use this code which works great, my file only is save as a html file, but when I open it it is opened as pdf but in the browser. I tested it on Chrome 36, Firefox 31 and Opera 23.
This is my angularjs code (based on this code):
UserService.downloadInvoice(hash).success(function…