fix(NavController): fire onPageWillUnload/DidUnload

Fixes #5507
This commit is contained in:
Adam Bradley
2016-02-18 11:05:45 -06:00
parent 7e3eb23345
commit 8f0b88b7e4
3 changed files with 45 additions and 21 deletions

View File

@@ -271,7 +271,9 @@ class AnotherPage {
constructor(
private nav: NavController,
private viewCtrl: ViewController
) {}
) {
console.log('Page, AnotherPage, constructor', this.viewCtrl.id);
}
pushFullPage() {
this.nav.push(FullPage);
@@ -304,6 +306,34 @@ class AnotherPage {
this.viewCtrl.setBackButtonText(backButtonText);
++this.bbCount;
}
onPageWillEnter() {
console.log('Page, AnotherPage, onPageWillEnter', this.viewCtrl.id);
}
onPageDidEnter() {
console.log('Page, AnotherPage, onPageDidEnter', this.viewCtrl.id);
}
onPageWillLeave() {
console.log('Page, AnotherPage, onPageWillLeave', this.viewCtrl.id);
}
onPageDidLeave() {
console.log('Page, AnotherPage, onPageDidLeave', this.viewCtrl.id);
}
onPageWillUnload() {
console.log('Page, AnotherPage, onPageWillUnload', this.viewCtrl.id);
}
onPageDidUnload() {
console.log('Page, AnotherPage, onPageDidUnload', this.viewCtrl.id);
}
ngOnDestroy() {
console.log('Page, AnotherPage, ngOnDestroy', this.viewCtrl.id);
}
}