mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
test(setRoot): close menu on nav resolve
This commit is contained in:
@ -37,12 +37,13 @@ class E2EApp {
|
||||
}
|
||||
|
||||
openPage(page) {
|
||||
// close the menu when clicking a link from the menu
|
||||
this.app.getComponent('leftMenu').close();
|
||||
|
||||
// Reset the content nav to have just this page
|
||||
// we wouldn't want the back button to show in this scenario
|
||||
let nav = this.app.getComponent('nav');
|
||||
nav.setRoot(page.component);
|
||||
nav.setRoot(page.component).then(() => {
|
||||
// wait for the root page to be completely loaded
|
||||
// then close the menu
|
||||
this.app.getComponent('leftMenu').close();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user