I have a simple set of pages controlled by a parent component.
import {Component} from '@angular/core';
import {HomePage} from '../home/home';
import {ContactPage} from '../contact/contact';
@Component({
template: `
<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
</ion-tabs>
`
})
export class TabsPage {
private tab1Root: any;
private tab2Root: any;
constructor() {
this.tab1Root = HomePage;
this.tab2Root = ContactPage;
}
}
When tab 2 is selected it displays the contact page, which has a ionViewDidEnter
function.
This function is only ever called once, the first time the contact page is viewed, navigating back to the home page, and then returning to the contact page does not trigger the ionViewDidEnter
function.
What lifecycle event should I be using to get notified whenever the contact page gets displayed/activated?