Programmatically scroll to the top of a collection-repeat list


#1

Hi

I have a collection-repeat list with filter buttons.
When the user scrolls down, then filters the list and there are less items, the list is all blank white, because the scroll position is too low to see the reduced filtered list. So, unless there is a way for collection-repeat to do this, I would like the list to scroll to top when a radio checkbox is checked.

Can someone help me achieve this please ?

Thanks


#2

You can use $ionicScrollDelegate. Pass $ionicScrollDelegate to the contoller function and use $ionicScrollDelegate.scrollTop(); where you want to go to top.


#3

Perfect, thanks a lot !