Solved.
Relates to Problem to call setRoot in my Alert callback
I saw in the docs that Alerts have a .dismiss()
function which returns a promise, and if changing the rootNav in an Alert close handler, you must call .dismiss(
) and then call nav.setRoot(
) inside the returned promise
skip() {
let confirm = Alert.create({
title: 'Skip',
message: 'Are you sure you want to skip changing your PIN?',
buttons: [
{ text: 'Cancel', role: 'cancel' },
{ text: 'Skip', handler: () => {
confirm.dismiss().then(() => {
this.nav.setRoot(TabsPage);
})
}
}
]
});
this.nav.present(confirm);
}