This works on chrome and firefox, but i need this in IE, i don't know how to make it works. Internet Explorer console says "access denied"
descargarPlantilla() {
this.cargaMasivaService.generarCSVPLD().subscribe(
data => {
const blob = new Blob([data._body], { type: 'application/octet-stream' });
const contentDisposition = data.headers.get('content-disposition');
if (contentDisposition && contentDisposition.indexOf('attachment') !== -1) {
const filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
const matches = filenameRegex.exec(contentDisposition);
}
this.modalMensajeService.modalExito('El Documento se ha descargado exitosamente');
},
error => {
this.modalMensajeService.modalError(error);
}
);
}