@zhouhaowowtv wrote:
I have a login page and a home page. After I click the login, I call setRoot to my home page. This is fine.
In my Home page, there is a "Logout" button. When I click it, I'll setRoot to my Home page inside my alert's callback. Here is my code:
let confirm = Alert.create({ title: 'Confirm', body: 'Are you sure to log out?', buttons: [ { text: 'Yes', handler: () => { this.nav.setRoot(LoginPage); } }, { text: 'No', handle: () => { console.log('No clicked.Do nothing!'); } } ] }); this.nav.present(confirm);
But screen go blank when I click "Yes". It will be fine when I click "Yes" again.
Any idea? Thanks.
Posts: 6
Participants: 2