我有字段总数,我需要阻止在Component.html上显示总数”>
我已经做到了,但是如果您能告诉我如何做到这一点,那就行不通了。
我在标题列和主体数据上以角度7动态显示数据
我尝试在下面使用过滤器功能,但不起作用
this._displayreport.GetReportDetailsPaging(this.searchData).subscribe((data: any[]) => { this.reportdetailslist = data; this.headerCols = Object.keys(data[0]); this.contentBody=data.filter(item =>item != data[0].totalCount); }); } } <thead> <tr> <th > <ng-container *ngIf="coln != 'totalCount'"> {{coln}} </ng-container> </th> </tr> </thead> <tbody> <tr *ngFor="let rep of contentBody"> <td *ngFor="let coln of headerCols"> <span> {{rep[coln]}} </span> </td> </tr> <tbody>
数据对象将以下数据表示为任何[]
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
我有字段总数,我需要阻止在Component.html上显示总数,但是我已经做到了,但是如果你能告诉我如何做到这一点,那就行不通了?我在标题列上动态显示数据...
通过将我上面的代码更改为来解决