3 Replies Latest reply on Nov 12, 2019 9:32 AM by Daniel Merchán

    Routing / Child Routing, difficulties, a bit stuck.


      I am really struggling trying to get my header the router / routing in an application. I've studied the starter templates, fixitfast and the cookbook / various blogs but things just aren't sticking and working for me.


      My main goal is this:
      Default navigation between modules which works fine based on the starter template. However, I am having trouble finding consistent examples using child routers. Nothing seems to quite show how to pass the $parent parameters in, I have tried to mix and match some different things and modifed the loadModule but that didnt seem to work. Essentially I want to be able to do the following:


      Main navigation:
      Module1, Module2, Module3


      Sub Navigation:
      Module1 -> Module1a, Module1b

      Module2 -> Module2a, Module2b


      So when you are inside Module 1 there is something like a tab bar / select one choice and based on that the user is directed towards module1a, module1b, which have their own view/viewmodule. However, I still want "Module 1" to be selected in the main navigation view but allow the user some back buttons so they navigate back to main view if needed.


      The fixitfast seems to be the only one I can see that does it similar but then it doesnt follow a lot of the same methods as some of the other examples so really got confused on best approach.