[IONIC 4] Tabs, scroll to the top when already in the page?



Before i was on Ionic V3 and i used this method to scroll to the page when i was already on the tab pressed and thas was perfect but now on Ionic V4 is not working anymore the “IonSelected” is not working at all.

Any idea on how i can do ?

Code :

import { IonContent } from ‘@ionic/angular’;

@ViewChild(IonContent) content: IonContent;

ionSelected() {
  this.content.scrollToTop(); // 300ms
1 Like