Scroll down programmatically


how to scroll down or up scrollview from code?


In your xml/html file, add an id to the scrollview :

<ScrollView #ScrollList>

In your js/ts file, add the scroll view id :

@ViewChild("ScrollList") scrollList:ElementRef;

then you can access scrollToVerticalOffset function like so (n is the integer you want to scroll to) :



@pacome2017 I don’t think scrollToIndex is a defined method of ScrollView.

Try .scrollToVerticalOffset / .scrollToHorizontalOffset.


you’re right, it is defined for listView, i’ve updated my answer