Ion-scroll: Scroll programmatically


Apparently, ion-scroll has no API unlike ion-content. The latter can be scrolled with scrollTo(), but how do you programmatically scroll an ion-scroll? Also, ion-scroll has no .nativeElement if fetched via @ViewChild('scrollContainer') scrollContainer: ElementRef. So I don’t even see a way to call a non-Ionic API.

Any ideas how to scroll ion-scroll programmatically?

Background: I have a big Canvas in an ion-scroll and I need to automatically scroll to the right side of that Canvas.


If you read the $ionicScrollDelegate docs you will see that it is also used for scrolling views created by ion-scroll.$ionicScrollDelegate/


Thanks for the quick reply, but I’m talking about Ionic 2 :wink: