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

后端 未结 4 1828
生来不讨喜
生来不讨喜 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 14:55

    There are a couple of approaches, maybe the most reusable is for you to create your own 'visible' custom filter which looks for visible attribute on your items. Then you could chain them.

    Here's a SO link to create custom filters

提交回复
热议问题