Let's assume that I have in html *ngFor="let cell of dateFormat(row)">{{cell | filesize}}</td> and dateFormat looks in this way
dateFormat(row:string){
var today = new Date(row[4]);
let latest_date = this.datepipe.transform(today, 'yyyy-MM-dd');
row['4'] = latest_date;
return row;
}
HTML:
<tr *ngFor="let row of this.UploaderService.tableData2.dataRows">
<td [ngClass]="{'active': check(row) }" (click)="listClick($event, row)"
(dblclick)="listDoubleClick($event, row)"
*ngFor="let cell of dateFormat(row)">{{cell}}
</td>
</tr>
Is there any way to call filesize only on row['2']? At the moment filesize works properly however it formats all of the rows. I tried in dateFormat but I am not sure how can i use filesize in typescript . Something like this
let latest_date = this.datepipe.transform(today, 'yyyy-MM-dd');
row['4'] = latest_date;
row['2'] = here convert row['2'] using filesize;
return row;
Any ideas?