Ionic V4 (angular) content.scrollToTop

Use

@ViewChild(IonContent) content: IonContent;

...

this.content.scrollToTop(500);

It works for me, hope it will help you too. For more details https://www.freakyjolly.com/ionic-4-how-to-scroll-to-top-bottom-using-ion-content-scroll-events/


Seems like the scrollToTop() method was added in v4.0.0-beta.3 but some issues were fixed a few hours ago in v4.0.0-beta.6, so please update Ionic to the beta.6 version and the scrollToTop() method should be available there.

EDIT:

Thanks, but I'm already on V4.0.0-beta.6. Checking API, clearly there is no scrollToTop() anymore.

I'm sorry to insist, but I've just installed V4.0.0-beta.6 and I'm able to use the scrollToTop() method without any problems:

enter image description here

enter image description here