Displayed in my user interface is a simple number, nothing fancy.
<ion-label>{{myCount}}</ion-label>
Next to the number, there is a button labeled "reset." When pressed, the counter resets to 0. This functionality works well with a basic function:
reset(){
this.myCount = 0;
}
However, for a smoother user experience, I would like the number to visually decrease to 0 instead of jumping directly from 8 to 0. I attempted using a for loop like this:
for(let num = currentCount; num >= 0; num--)
this.myCount = num;
Unfortunately, the transition happens too quickly to be visible. Any suggestions on how to incorporate animation from Ionic 3 or Angular, or any alternative methods?