I try to scroll to a fixed position, for example scrollTo(500, 20). Let\'s say that you are on a device, which has got a width of 300 pixel. The scroll target is now out of
To add to the answers above, this will handle smooth scrolling.
Name the scroll element in your .html
Import the scroll.
import { Scroll } from 'ionic-angular';
Reference the scroller in the .ts
@ViewChild('scroll') scroll: any;
Add this code where its needed:
this.scroll._scrollContent.nativeElement.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
Hope that helps somebody.