I have a column formatted as currency. If the value of the column is 0, I would like it to display empty string, instead of $0.
What would be the best way to go about that?
|
[app.component.ts]
export class AppComponent { public data: Object[] = [];
ngOnInit(): void {
this.data = sampleData;
}
cell(args){
if(args.column.field == "duration"){
if(args.data.duration == 0){
args.cell.innerText = '';
}
}
}
}
|
|
[app.component.html]
|
Thank you, this worked!