ionic 5 scroll to top code example
Example 1: ion-content --offset-bottom
ion-content {
--offset-top: 0 !important;
}
Example 2: ionic move view to top of page when selected
<ion-tabs>
<ion-tab [root]="tab1Root" (click)="myMethod()"></ion-tab>
<ion-tab [root]="tab2Root" (click)="myMethod2()"></ion-tab>
<ion-tab [root]="tab3Root" (click)="myMethod3()"></ion-tab>
</ion-tabs>
myMethod()
{
this.content.scrollToTop();
}