Using ng-repeat and limitTo to limit the number of visible items displayed

后端 未结 4 1817
生来不讨喜
生来不讨喜 2020-12-09 14:48

I\'m trying to limit my result sets to a fixed number. I can use limitTo with ng-repeat, but this limits items regardless of their current visibili

4条回答
  •  失恋的感觉
    2020-12-09 15:17

    You can use ng-if with $index to specify DOM display. Still generates ng-if comments but doesn't load the object so much improved performance noticed.

    {{object}}

提交回复
热议问题