I work on angular 7 I face Issue I need to display offlineurl as download Link where it
Exist on report control table and columnType=1 .
ReportId FieldName ReportStatus ColumnType
2028 offilneURL Link 1
2028 onlineURL Hidden 2
so I try to make it as below :
my stack-blitz sample as below :
https://stackblitz.com/edit/create-ijwgfx?file=app%2Fapp.component.ts
Expected Result :
on column offlineurl (five column from left ) it display as
https://source.z2data.com/2019/1/13/8/55/47/351/662203977/21527_SPCN.PDF
I need to show it as
download link name when click on it it will display link above on browser
where Exist on report control table
What I have tried:
<tr *ngFor="let rep of contentBody">
<td *ngFor="let coln of headerCols">
<span *ngIf="coln !== 'offilneURL'">
{{rep[coln]}}
</span>
<ng-container *ngFor="let repcon of ReportControl">
<div *ngIf="coln==repcon.fieldName">
<div *ngIf="repcon.columnType==1">
<a (click)="goToLink(rep.offilneURL)"></a>
</div>
</div>
</ng-container>
</td>
</tr>