Back to top onclick tabs

I have a page with multiple tabs and scrollable content in it. So that if I scroll and go down on the page and if I click the tab, it should scroll to top of the page.
How can we do this.

You could try https://ionicframework.com/docs/api/service/$ionicScrollDelegate/:

$ionicScrollDelegate.scrollTop(true);

I ran into some flicker issues when I used this though.


I used angular-scroll in the end with

angular.element(document.querySelector('ion-content')).scrollTop(0, 400);