download a file when link clicked in angular 9?

232 views Asked by At

I'm new to angular.I'm using primeng upload to upload files. after uploading I'm showing it as links in my page by looping through it.

<ng-container *ngFor="let document of searchVideoConsultation.TmpDocument">
          <div class="ui-g form-group">
            <div class="ui-g-12 ui-md-9">
              <a href="javascript:void(0)"
                (click)="onClick($event, searchVideoConsultation)">{{document.Document?.Name}}</a>
            </div>
      </div>
</ng-container>

I want to download an uploaded file when clicking on the link.

How can I achieve this?

0

There are 0 answers