If a non-zero value has already been set on $scope.current and $scope.total, and then the values are set to zero, the circle will not update correctly because updateProgress is given a NaN as the pos parameter.
As a quick fix, I added this conditional at the beginning of updateProgress:
if (isNaN(pos)) {
pos = 0;
}
There is probably a better way to fix this, but this is working for now.
If a non-zero value has already been set on $scope.current and $scope.total, and then the values are set to zero, the circle will not update correctly because updateProgress is given a NaN as the pos parameter.
As a quick fix, I added this conditional at the beginning of updateProgress:
There is probably a better way to fix this, but this is working for now.