How to use this.navCtrl.push in app.components.ts


I’m trying to use this.navCtrl.push(somepage) on an icon in the flyout menu that is located in the ion-toolbar of app.html. I seem to be able to import the NavController too app.componets.ts but I cant add it to the constructor without it erroring. How in the world can I push from the app.componets.ts, it making me crazy please help



how your app.html looks and how your app.component.ts looks?

Maybe in your html is a ion-nav defined, that in app.component.ts is catched with @ViewChild.

Best regards, anna-liebt


hey, thanks that helped.
using @ViewChild(Nav) nav;

thanks for the help again