在angularjs NG重复和收集重复之间的区别? [英] Difference between ng-repeat and collection-repeat in angularjs?
问题描述
我得到关于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 sayscollection-repeat
was created to be used instead ofng-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 thanng-repeat
这篇关于在angularjs NG重复和收集重复之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!