---Update---
I had previously posted this question without receiving a solution. I came across a Github blog that mentioned the "isButtonDisabled" alone may not work and a function needs to be called instead. In my TypeScript code, I can only generate a boolean value after validating certain conditions. What could possibly be going wrong?
Check out the GitHub link for reference
I have experimented with both [disabled] and disabled attributes but they do not seem to align with my TypeScript condition. I have four buttons that need to be enabled or disabled based on my TypeScript logic involving seven different conditions. Presently, the button gets disabled regardless of the condition. Can anyone suggest an alternative approach to address this issue?
HTML
<button type="button" [disabled]="isButtonDisabled"
style="background: #79CEA4 !important;color: #FFFFFF !important;font-size: 13px;font-weight: 600;margin-right: 20px"
class="btn btn-lg" (click)="finish()">FINISH</button>
TS
isButtonDisabled: boolean;
for (var EmployeeList of Employee){
if (EmployeeList.EmployeeStatus == 'Active') {
this.isButtonDisabled = false;
return 'circle3';
}
else if (EmployeeList.EmployeeStatus == 'Inactive') {
this.isButtonDisabled = true;
return 'circle1';
}