在angularjs NG重复和收集重复之间的区别? [英] Difference between ng-repeat and collection-repeat in angularjs?

查看:199
本文介绍了在angularjs NG重复和收集重复之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到关于NG重复和收集重复

有点混乱

NG-重复

 <离子项目NG重复=中的项项>
    ...
< /离子项目>

集合重复

 <离子项目集合重复=中的项项>
    ...
< /离子项目>

两线以上都做得很好,一样的。


  

请让我知道,如果有任何区别。另外我有1000个项目,所以哪一个是对于这种情况更好?和怎么样的渲染速度和怎么样的性能状态?



解决方案

集合重复不是angularjs的一部分。至于我可以看到它是从离子框架。由于文件说 集合重复创建用于代替 NG-重复,因为它可能会与大量的项目更好地工作。


  

集合重复允许应用多秀项巨大的名单
  更performantly比 NG-重复


i got a little bit confusion about ng-repeat and collection-repeat

ng-repeat

<ion-item ng-repeat="item in items" >
    ...
</ion-item>

collection-repeat

<ion-item collection-repeat="item in items">
    ...
</ion-item>

the above both lines are doing well and same.

Please let me know if any difference there. also i have 1000 items, so which one is better for this scenario? and how's the rendering speed and what about the performance status ?

解决方案

collection-repeat is not part of angularjs. As far as I can see it's coming from Ionic Framework. As documentation says collection-repeat was created to be used instead of ng-repeat as it might work better with large number of items.

collection-repeat allows an app to show huge lists of items much more performantly than ng-repeat

这篇关于在angularjs NG重复和收集重复之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆