see image below the text with green color that i need to remove because it .
post updated
structure of content body on ts file
<tbody>
<ng-container *ngFor="let repcon of ReportControl">
<tr *ngFor="let rep of contentBody">
<td *ngFor="let coln of headerCols">
<span>
{{rep[coln]}}
</span>
<div *ngIf="coln==repcon.fieldName">
<div *ngIf="repcon.columnType==1">
<a (click)="goToLink(rep.offilneURL)">page link</a>
</div>
</div>
</td>
</tr>
</ng-container>
</tbody>
data structure for content body :
already have link
Updated post
according to my structure I need to change
this._displayreport.GetReportDetailsPaging(this.searchData).subscribe((data: any[]) => {
this.reportdetailslist = data;
this.headerCols = Object.keys(data[0]);
this.contentBody = data;
});
to
companyName: "Innovasic, Inc."
done: "0"
notImpacted: "0"
notificationDate: "2009-11-12"
offilneURL: "https://source.z2data.com/2019/1/13/8/55/47/351/662203977/21527_SPCN.PDF"
onlineURL: "N/A"
pending: "3"
reportDate: "2020-05-07"
revisionID: "272299243"
teamName: "MFG"
totalCount: 79
I face issue Cannot hide or remove URL exist as plain text on column name offilneUrl I already do as link so that no need to plain text URL above So I need to hide or remove or empty URL plain text ...
https://stackblitz.com/edit/create-4ud1rg?file=app%2Fapp.component.html
It's just because:
<span *ngIf="coln != 'onlineURL'">
{{rep[coln]}}
</span>
is still displaying the value regardless so just hide it
<span *ngIf="coln != 'repcon.filedName'">
{{rep[coln]}}
</span>
the column is the urlBase on the content body structure and logic you shared, you can hide the link as follows.
<span>
{{rep[coln]}}
</span>
Based on logic ==>if
I think you are showing the link based on the condition repcon.columnType==1, So check for converse to hide the offline link.
<span *ngIf="repcon.columnType != 1">
{{rep[coln]}}
</span>
This can be handled in other way as well.Hope this helps.
<span *ngIf="repcon.columnType!=1">
{{rep[coln]}}
</span>
我面临的问题是无法隐藏或删除列名offilneUrl上存在的纯文本URL。
我已经做了链接,所以不需要上面的纯文本URL。
所以我需要隐藏或删除或清空URL纯文本上面的word页面链接。
<span *ngIf="coln != 'onlineURL'">
{{rep[coln]}}
</span>
我尝试了以下的方法{{rep.offilneURL