Hello everyone, I’m working on an Ionic 2 App (RC4) and I’m running into an issue that looks like a common use case to me, but I’m not managing to figure out how to get it to work.
Let me first explain my current setup and intended result. I have a home component with a list of items that has a NavController, to navigate between the full list and the details page for each list item. This works marvellous.
In the ion-navbar of my home component I have a button that opens a modal with a form component (used to add new items to the list).
Now I’d like to instantiate a new NavController inside my modal, that allows me to navigate between components within the modal (and as such divide my form in separate pieces).
The problem is that whenever I push a new component (for example form2 page) on the navController that is defined inside the page that was opened in the modal, it pushes the page on the main stack. Instead I’d like to start with a new stack inside the modal-context and push the page only onto that stack.
I’ve looked around and found topics that touch on the subject, but nothing that comes really close to what I’m after.
So first of: is it actually possible to maintain multiple navControllers / nav stacks within and Ionic2 app? And secondly: how can I select the proper stack before pushing a new page onto it?