Here’s the concept: #content Here we are creating just a local reference of the nav controller shown by directive < ion-nav> , now this local reference can be later used in the app.component.ts(main loading component of your app) like this: @ViewChild(‘content’) nav
now we have this instance nav which we can use to push or pop pages on the nav-controller…
Do ping in case more info is needed on the same…
Navigating from the Root Component
What if you want to control navigation from your root app component? You can’t inject NavController because any components that are navigation controllers are children of the root component so they aren’t available to be injected.
By adding a reference variable to the ion-nav, you can use @ViewChild to get an instance of the Nav component, which is a navigation controller (it extends NavController):