displayData = [
{
status: 'CLOSED', ack: false
},
{
status: 'ESCALATED', ack: false
},
{
status: 'ACK', ack: false
},
{
status: 'ACK', ack: true
},
{
status: 'NEW', ack: true
}
]
In this scenario, the goal is to only disable the div if the status is 'NEW' and the acknowledgment is 'true'. For all other combinations of status and acknowledgment, the div should remain enabled.
<div class="action-default"
[ngClass] = "!['CLOSED', 'ESCALATED', 'ACK', 'NEW'].includes(dataDisplayed?.status) ? '' : 'disabled'" >
<i nz - icon nzType = "close-circle" nzTheme = "outline" > </i>
Cancel
< /div>