You can use this this.app.getRootNavs()[0] because getRootNav() is
getRootNav(): any {
const rootNavs = this.getRootNavs();
if (rootNavs.length === 0) {
return null;
} else if (rootNavs.length > 1) {
console.warn(’(getRootNav) there are multiple root navs, use getRootNavs instead’);
}
return rootNavs[0];
}
import { App } from ‘ionic-angular’;
rootNavCtrl: NavController;
constructor( private app: App ) {}
this.rootNavCtrl = this.app.getRootNavs()[0]