为什么在使用 collection-repeat 而不是 ng-repeat 时不显示列表 [英] why list is not display while using collection-repeat instead of ng-repeat

查看:23
本文介绍了为什么在使用 collection-repeat 而不是 ng-repeat 时不显示列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的演示中使用了 ng -repeat.但是由于来自服务的大量数据.我想使用 collection-repeat 来获得更好的性能.我将如何使用 collection-repeat 来获得相同的输出.这里是我的笨蛋

<div class="row" ng-repeat="i 中的列 | limitTo: counter track by $index" ng-class-odd="'odd-row'"><div class="col brd collapse-sm" ng-repeat="field in column.columns" ng-show="i[$index].checked && i[$index].f===field.fieldNameOrPath">{{field.value}}</div><div class="col col-10 text-center brd collapse-sm"></div>

</ion-scroll><ion-infinite-scroll立即检查="false" on-infinite="loadMore(query)" distance="10%"></ion-infinite-scroll>

在这里我试图使用这样的集合重复

但没有得到相同的结果

我们可以使用细网格视图吗?

解决方案

希望你现在能找到答案,但以防万一,希望这会有所帮助...

集合重复不支持limitTo: counter track by $index"

如果您仍有问题,请告诉我.

I used ng -repeat in my demo .But due to large data coming from service .I want to use collection-repeat for performance better .how I will use collection-repeat to get the same out put here .here is my plunker

<ion-scroll scrollbar-y="true" delegate-handle="i" ng-style="viewHeight">
          <div class="row" ng-repeat="column in i | limitTo: counter  track by $index" ng-class-odd="'odd-row'">
            <div class="col brd collapse-sm" ng-repeat="field in column.columns" ng-show="i[$index].checked && i[$index].f===field.fieldNameOrPath">{{field.value}}</div>
            <div class="col col-10 text-center brd collapse-sm"></div>
          </div>
        </ion-scroll>
        <ion-infinite-scroll immediate-check="false" on-infinite="loadMore(query)" distance="10%"></ion-infinite-scroll>

here I am trying to use collection repeat like that

But not getting same result

can we use thin grid view ?

解决方案

Hopefully you were able to find the answer by now but just in case, hopefully this will help...

Collection repeat does not support "limitTo: counter track by $index"

Please let me know if you are still having issues.

这篇关于为什么在使用 collection-repeat 而不是 ng-repeat 时不显示列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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