问题
<p> <b>{{ x.title }} </b> Rating:{{ x.rating | number:1}}</p>
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?
回答1:
I'm an idiot. CLEAR YOUR CACHE KIDS - It was working but hadn't reloaded my index.html file.
来源:https://stackoverflow.com/questions/29421770/angularjs-val-number1-not-rounding-to-1-decimal-place