-
+
@@ -147,10 +147,10 @@ class FirstPage {
})
class FullPage {
constructor(
- private nav: NavController,
- private app: App,
- private alertCtrl: AlertController,
- private params: NavParams
+ public navCtrl: NavController,
+ public app: App,
+ public alertCtrl: AlertController,
+ public params: NavParams
) {}
setPages() {
@@ -159,19 +159,19 @@ class FullPage {
{ page: PrimaryHeaderPage }
];
- this.nav.setPages(items);
+ this.navCtrl.setPages(items);
}
pushPrimaryHeaderPage() {
- this.nav.push(PrimaryHeaderPage);
+ this.navCtrl.push(PrimaryHeaderPage);
}
pushAnother() {
- this.nav.push(AnotherPage);
+ this.navCtrl.push(AnotherPage);
}
pushFirstPage() {
- this.nav.push(FirstPage);
+ this.navCtrl.push(FirstPage);
}
presentAlert() {
@@ -182,11 +182,12 @@ class FullPage {
text: 'Dismiss',
role: 'cancel',
handler: () => {
- // overlays are added and removed from the root navigation
- // ensure you using the root navigation, and pop this alert
- // when the alert is done animating out, then pop off the active page
- this.app.getRootNav().pop().then(() => {
- this.app.getRootNav().pop();
+ // overlays are added and removed from the app root's portal
+ // in the example below, alert.dismiss() dismisses the alert
+ // from the app root portal, and once it's done transitioning out,
+ // this the active page is popped from the nav
+ alert.dismiss().then(() => {
+ this.navCtrl.pop();
});
// by default an alert will dismiss itself
@@ -217,11 +218,11 @@ class FullPage {
-
+
-
+