首页 新闻 会员 周边

关于ng-bind和{{}}绑定对象,显示不一致的问题,

0
悬赏园豆:5 [已解决问题] 解决于 2016-04-22 14:33

关于ng-bind和{{}}绑定对象,显示不一致的问题,搜索说{{}}页面没有渲染完就显示了,ng-bind是页面渲染完以后才显示的绑定内容的,

sky300的主页 sky300 | 初学一级 | 园豆:95
提问于:2016-04-21 18:38
< >
分享
最佳答案
0

应该是内部实现不一样。

http://stackoverflow.com/questions/25741586/difference-between-ng-bind-and-interpolation-in-angular

From http://stackoverflow.com/a/19744728/987185 :

Depending on whether you use {{ ... }} or ng-bind syntax, the .toJSON and the .toStringfunction on your object will be called to determine its representation.

ng-bind可以加上过滤实现

<span ng-bind="person | json"></span>

 

收获园豆:5
写代码的小2B | 老鸟四级 |园豆:4371 | 2016-04-22 11:07

恩,谢谢的你回复

sky300 | 园豆:95 (初学一级) | 2016-04-22 14:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册