I working on angular 7 app i need to write condition on data content to display text field as link
on this line content of data display
- <ng-container *ngFor="let repdata of ReportData">
- <tr *ngFor="let rep of contentBody">
-
- <td *ngFor="let r1 of rep"><span ngcontent-wdt-c24="" nbtooltipplacement="right"
- class="ng-star-inserted">{{r1}}</span></td>
-
- <td
on these line header display meaning columns name
- <thead style="width: max-content">
- <tr>
- <th _ngcontent-wdt-c24="" style="width: max-content;" *ngFor="let coln of headerCols">
- <ng-container *ngIf="coln != 'totalCount'">
-
- {{coln}}
- </ng-container>
- </th>
-
-
- </tr>
- </thead>
ts for content body and headercol data source
- this._displayreport.GetReportDetailsPaging(this.searchData).subscribe((data: any[]) => {
-
- this.reportdetailslist = data;
-
- this.headerCols = Object.keys(data[0]);
-
- data.forEach((item) =>{
- let values = Object.keys(item).map((key)=> item[key]).filter(item =>item != data[0].totalCount)
-
- this.contentBody.push(values);
-
-
- });
-
-
- });
data displayes is
- reportid url
- 1222 display as icon
- 1333 as it returned
- 1555 as it returned
I need to know how to write condition if reportid=1222
then display column as icon can click on it
on
data above i have two column must be exist
reportid url
I need to write if reportid =2020 then convert text url to icon
so how to do that please ?