Я бы открыл PDF-файл в навигаторе
На самом деле Chrome работает. при нажатии на файл pdf открывается в новом окне
public openFile(path) {
let url='/download/';
let headers = new HttpHeaders();
let pathFile= new HttpParams().set('pathFile', path);
return this.httpClient.get(url,{params:pathFile, responseType: 'blob'})
}
тогда в моем компоненте
openFile(path){
this.creditPoliciesService.openFile(path).toPromise().then (data => {
var blob = new Blob([data], {type: 'application/pdf'});
var fileURL = URL.createObjectURL(blob);
window.open(fileURL);
});
В Internet Expolorer и Firefox, когда я нажимаю на ссылку, открывается новая вкладка, затем в строке URL я получаю этот адрес blob:http://......code....
Как читать BLOB-объекты в IE?