i'm trying to start an animation by clicking on an icon and then it should just be annimated for 2 seconds and then it should automatically stop i used a variable "spin" that it's initialized as false and on clicking on the icon it passes to true
<span class="mr-4 pr-3">
<fa-icon [spin]="spin" style="color : white; font-size: large; top: 0; " [icon]="faArrowAltCircleDown"
(click)="refreshTaskList()"></fa-icon>
</span>
.ts file:
public spin=false;
refreshTaskList() {
this.spin=true;
}
so if i leave it as [spin]="trueƩ" it will be spinning for ever and like i did it now it will start spinning when clicked and never stop !! i want it to start spinning and stop after 2 seconds