Closed peppinho89 closed 7 years ago
Thanks for pointing this out. I will use native angular.isDefined()
call to identify undefined ness of nv
. I will fix this up. Thanks!
Hi,
One more query on this.
I modify the guage value dynamically on the same screen/page on selection of an element from dropdown. Lets say by default, I have a process in 100%/50% completion state. Now if I change the dropdown to an element which has 0% completion then this doesnt refresh the guage.
In my controller this is the code I have:
$scope.perc = 0;
onboardServices.getOpenOnboardingStatus($scope.process.processkey).then(function(response) { console.log("Status: ", JSON.stringify(response.data)); $scope.obcase = response.data.items[0]; $scope.perc = Math.round(($scope.obcase.complete_count/$scope.obcase.total_count)*100); },function(error) { alert("OB Status request failed. Please try again."); });
This happens only when binding the guage with 0% from any higher value.
Looks like I am also hitting this issue #34. Is there a work around?
BTW, following the solution proposed by peppinho89 helped fixing this temporarily.
Hi @samdanishaik, yes, @peppinho89 proposed one solution and in my comment also i mentioned to use angular.isDefined()
to check nv. However, i have fixed this bug, will release it as 2.0.1 version. You may take the update then.
Thanks!
@samdanishaik, @peppinho89
2.0.1 is published to npm. You can take an update. Let me know if you find any other or related issue.
Thanks! Ashish
The second if statement prevent redraw if the new value (nv param) is zero.
This could fix it