HTML*
<ng-template #actionButtons let-data="data">
<div class="cell-actions">
<a href="javascript:;" (click)="assign()">
<i nz-icon nzType="user-add" nzTheme="outline"></i>
</a>
<i nz-icon nzType="user-delete" nzTheme="outline"></i>
</div>
</ng-template>
TS
ngOnInit() {
this.getData();
}
onGridReady(event: any) {
this.columnDefs = this.colParser.parseConfigColumnDefs(this.columnDefs, this.actionButtons);
}
getData() {
this.assets.getAll({ start: 1, length: 999, type: this.data.assetType.code }).pipe(take(1)).subscribe((res: any) => {
res.data.map((data: any) => {
this.row$.push({
id: data.id,
status: data.status
});
});
this.rowData$.next(this.row$,);
})
}
assign() {
}
The objective here is to display the
<i nz-icon nzType="user-add" nzTheme="outline"></i>
icon when the status is ACTIVE. When the status is NOTACTIVE, it should display the <i nz-icon nzType="user-delete" nzTheme="outline"></i>
instead of the <i nz-icon nzType="user-add" nzTheme="outline"></i>
.