If you wan't to download a file in HTML you can just put a download tag like the following:
<a href="downloads/path" download>Download file</a>
In my application you can search for a project and then you can download the files to it. I can perfectly search after the files and I get them displayed as I want. So then I tried to download them, but however it won't work.
Here is my HTML code:
<div *ngFor="let file of FILES">
<a href="{{file.downloadUrl}}" download>{{file.name}}</a>
</div>
The problem now is, the files opens himself in the browser, but it should download itself. I am really confused at this point, because it is literally like it should be (atleast I think so)