I tried extracting a portion of ion-menu into its own component since I need to do some dynamic hiding of menu options based on a json return but that http call can only happen if a user has already logged in. When I do this nav no longer seems to do anything. Doesn’t give any errors since nav is being instantiated but doesn’t do properly set the root of the nav to the selected page. I’ve recreated the issue in plunkr. And also commented out a working solution if you only have the menu in app.ts since issue only appears when you try to extract a portion of the ion-menu.
http://embed.plnkr.co/i9Rn3V7J9KV9zjsJSjhn/
So for anyone trying to do the same thing. I’ve found the solution. The page needs to be emitted to the parent in this case app.ts and you would then set the root nav in app.ts. Recreated in a plunkr:
https://embed.plnkr.co/FTuIJrARBD1eZOI5BI5c/
1 Like