Collection-repeat get visible items in viewport


#1

Hello, im trying to get the item.id of my collection-repeat list.
Code is like this:

<ion-item collection-repeat="item in Items | limitTo:limit" data-id="{{item.id}}">

I want to get the id of collection-repeat items which are currently in the viewport. Specifically, if the item is in view for more than 1 second, then get the item id (using a timeout function).


#2

Yeah because thats the wanted behavior of the collection repeat :smile:

what are you doing with the data-id attribute?


#3

I want to get the id of collection-repeat items which are currently in the viewport. Specifically, if the item is in view for more than 1 second, then get the item id (using a timeout function). I tried plugins like angular-inview.js but they dont work with collection-repeat (for some reason). Is there another way ??