TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
275.4k
How to display text field as icon based on condition repor ?
May 19 2020 9:32 AM
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 ?
Reply
Answers (
0
)
why menu add space as white space blank on drop down ?
How to apply red color font to specific column for dynamic d