How to rest/refresh/destroy pages on tab



I’m using side menu and super tabs which include 3 pages, when click details button on home page it will go to the super tabs, now each page on super tabs has own API, there is set timer will fetch data every 30 second, Problem is when go back root home, the pages on the tab still connect to the API which mean function still working, i want to clear or destroy pages for each pageson the tab when press home page or when press another page on the tab?!

My code on super tabs:


ionViewDidLeave() {
console.log(‘ionViewDidLeave TabsPage’);

onTabSelect(ev: any) {
console.log(‘Tab selected’, 'Index: ’ + ev.index, 'Unique ID: ’ +;

on tabs.html

<super-tabs electedTabIndex=“2” toolbarColor=“light” toolbarBackground=“dark” indicatorColor=“light” badgeColor=“light” [config]="{ sideMenu: ‘left’ }" (tabSelect)=“onTabSelect($event)”>
<super-tab [root]=“exchangePage” title=“1” icon=“home” [rootParams]=“”>
<super-tab [root]=“exchangePage” icon=“ios-analytics” title=“2” [rootParams]=“”>
<super-tab [root]=“testPage” icon=“md-analytics” title=“3” [rootParams]=“”>

Thank you.


I tried to use ionViewDidLeave, but still function is working even on the home page


ionViewDidLeave() {
console.log(‘ionViewWillLeave TabsPage’);