AngularJS {{VAL |数量:1}}不四舍五入到1位小数 [英] AngularJS {{ val | number:1 }} not rounding to 1 decimal place
本文介绍了AngularJS {{VAL |数量:1}}不四舍五入到1位小数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<p> <b>{{ x.title }} </b> Rating:{{ x.rating | number:1}}</p>
以上code是我使用的是什么。这是正确获取的价值,因为它显示了四舍五入的数字(例如3.333333333),所以我知道该值正确地传递。为什么不多少:?#过滤器的工作
The above code is what I'm using. It is getting the value correctly because it is showing an unrounded number (e.g. 3.333333333) so I know the value is passed correctly. Why won't the number:# filter work?
推荐答案
我是个白痴。清除缓存KIDS - 这是工作,但没有重载我index.html文件
I'm an idiot. CLEAR YOUR CACHE KIDS - It was working but hadn't reloaded my index.html file.
这篇关于AngularJS {{VAL |数量:1}}不四舍五入到1位小数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文