【发布时间】:2016-03-28 23:25:30
【问题描述】:
使用此代码,我的 pdf 名称不正确:一串随机字母,如 uuid。 这个问题似乎只出现在 IE 10 / Edge 上。 AngularJS 的 1.4.7 版本
this.downloadPdf = function(pdfName){
console.log(pdfName);
$http.get(config.UrlApi + "/pdf/"+ pdfName.nameFile, { responseType: 'arraybuffer' });
var a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.target = '_blank';
a.download = pdfName.name;
document.body.appendChild(a);
a.click();
});
【问题讨论】:
标签: angularjs pdf cross-browser internet-explorer-10 microsoft-edge