I am writing a code to convert
HH:MM
to H.M
i.e 4:20
hrs == 4.33
hrs equivalent.
Here For that I want to convert the 20 minutes to 0.33
hrs by dividing it by 60
.
But everytime I get infdig scope error.
I have tried using
Number((minutes/60).toFixed(2))
-> no luck
Math.round((minutes/60 + Number.EPSILON) * 100) / 100
-> still no luck.
Can please anyone help me out here ?
There is nothing wrong with your code. An infdig scope error relates to a state change and subsequent $digest cycle in your component. See https://docs.angularjs.org/error/$rootScope/infdig