I'm trying to find a way to download a file using a location/link.
window.open(location)
opens another tab so I'm not keen on using that.
I know there's already a <a href='location' download>Download</a>
implementation but it does not seem to be doable right now since I'm using a custom component so I'm looking for an option like that in JavaScript.
Is there a way?
<custom-option (buttonClickEmitter)="downloadList(location)" [label]="translations.download"></custom-option>
File type is only CSV.
Thank you!