angular.js - angularjs数据还没有加载完,页面显示null,怎么解决
迷茫
迷茫 2017-05-15 17:00:57
0
2
445
<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