fix(nav): correctly set zIndex when there's a previous view

This commit is contained in:
Adam Bradley
2016-03-12 05:05:29 -06:00
parent 24443c3b53
commit 1dd73aac7a
3 changed files with 73 additions and 7 deletions

View File

@@ -13,10 +13,6 @@ export class E2EPage {
title: 'Not logged in',
message: 'Sign in to continue.',
buttons: [
{
text: 'Cancel',
role: 'cancel'
},
{
text: 'Sign in',
handler: () => {
@@ -45,7 +41,39 @@ export class E2EPage {
</ion-content>
`
})
class AnotherPage {}
class AnotherPage {
constructor(private nav: NavController) {}
onPageDidEnter() {
this.showConfirm();
}
showConfirm() {
const alert = Alert.create({
title: `Hi there`,
buttons: [
{
text: 'Go Back',
role: 'cancel',
handler: () => {
alert.dismiss().then(() => {
this.nav.pop();
})
}
},
{
text: 'Stay Here',
handler: () => {
console.log('Stay Here');
}
}
]
});
this.nav.present(alert);
}
}
@App({