Present page from App root


#1

I’m trying to present a page from the root of my app. The goal is to have the page appear over top of whatever page the user is currently viewing. That means the NavController may already have a stack of 5 pages based on the user’s navigation. From the root app I’d like to add on top of the stack a page indicating something has happened in the cloud.

The problem is when I present a page with the code below, the app resets back to the rootPage then presents the modal.

@App({...})
class MyApp {
...
let nav = this.app.getComponent('nav');
let my_modal = Modal.create(MyPage);
nav.present(my_modal);
...
}

What am I doing wrong?


#2

What about present this modal from the root page?


#3

Good call. That worked great, thanks for the tip!