Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to rest/refresh/destroy pages on tab

$
0
0

@binghco wrote:

Hello,

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:

tabs.ts:

ionViewDidLeave() {
console.log(‘ionViewDidLeave TabsPage’);
this.navCtrl.popToRoot();
}

onTabSelect(ev: any) {
console.log(‘Tab selected’, 'Index: ’ + ev.index, 'Unique ID: ’ + ev.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]=“navParams.data”>
<super-tab [root]=“exchangePage” icon=“ios-analytics” title=“2” [rootParams]=“navParams.data”>
<super-tab [root]=“testPage” icon=“md-analytics” title=“3” [rootParams]=“navParams.data”>

Thank you.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>