Actually i am trying to disable the button when the task is running. Once the task finished loading i want to activate the button. Means paralally the sync icon spins when the task status is in 'In_progress' once the status changes to 'Completed' the spinner should be hidden and the button 'AutoCode Sync' should be activated. So how to achieve that one. For that i have written the below code:
<section *ngFor="let task of tasksRes">
<nav>
<span class="text-warning" *ngIf="task?.status == 'In_progress'"><i class="fa fa-spinner fa-spin"></i></span>
</nav>
<div class="pull-right">
<button mat-raised-button color="primary" (click)="open();" class="btn-w-md">
AutoCode Sync
</button>
</div>
</section>
Can anyone please help me in this to achieve? Thanks.
[disabled]="task?.status=='In_progress'"