0

我正在写一个代码来转换

HH:MMH.Mhrs 4:20== 4.33hrs 等价物。

为此,我想通过将 20 分钟0.33除以 将其转换为小时60

但每次我得到 infdig 范围错误。

我试过使用

Number((minutes/60).toFixed(2))

-> 没有运气

Math.round((minutes/60 + Number.EPSILON) * 100) / 100 

-> 仍然没有运气。

可以请任何人帮助我吗?

4

1 回答 1

1

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

于 2021-03-15T13:07:40.997 回答