How to sroll to some ion-item by API call


#1

Hello,

I am trying to scroll to some element by API call,

$uiViewScroll(angular.element(document.getElementById(“SOMEID”)));

it success, but I can’t scroll back to top (by gesture) after that. Any idea ?


#2

Anybody know how? thanks in advance.


#3

OK I find a solution, the following code works:

    $location.hash(<SOMEID>);
    $ionicScrollDelegate.anchorScroll();