angular2-notifications
angular2-notifications copied to clipboard
Progress Bar is infinite
Hi, thank you for this. I liked so much.
I guess that I found a bug.
When I put a number smaller than 1000 in the timeOut
option, the progressbar is infinite and continue increasing. I don't know if the bug is in this block code, but I think it.
startTimeOut(): void {
this.steps = this.timeOut / 10;
this.speed = this.timeOut / this.steps;
this.start = new Date().getTime();
this.zone.runOutsideAngular(() => this.timer = setTimeout(this.instance, this.speed));
}
Thank you again.
Cheers!
Yeah I ran across this as well. The count starts at 1 but when you use a timeout less than 1000 you end up with < 1 steps required before timeout. Also the progress bar goes full screen width when this bug occurs.