angular.js - angularjs data has not been loaded yet, the page displays null, how to solve it
迷茫
迷茫 2017-05-15 17:00:57
0
2
460
<span class="zfcg-jg">{{dealGoodsPrice(info.realPrice)}}</span>

处理商品的价格,这时候应该是数据还没有填充,所以页面会先出现null,然后才出现数据。怎么解决这个问题,是不是怎么可以让他先不显示,一定不能显示null啊。
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
刘奇
<span class="zfcg-jg" ng-bind="dealGoodsPrice(info.realPrice)"></span>

When using ng-bind, it will be defaulted to the tag attribute by the browser, so nothing will be displayed.

阿神

Recommended use:

<span ng-bind="user.name"></span>

The effect is the same as {{}}, but using ng-bind, the data will not be displayed on the page until it is successfully loaded.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template