Back Button through modules not working

Hello guys,

I’m struggling with the back button when I’m navigating through “modules”.
Each “module” of our app consist of a state with sub-states. But, we have a scenario of navigation that we need to navigate inter-modules.

Here’s my example

I can go to Module A and then navigate through the sub-states an finally go to Module C. When I enter on Module C, there’s no Back Button. The same occur when I’m on a.b and go to b.a.

Another more complex scenario is when I enter on Module A, go to sub-state a.b, then go to b.a, b.b and finally c.a. When I go through this flux, I need to navigate back from c.a directly to a.b. I cannot do it with ionHistory.goBack() because each module has it’s own historyRoot.

Anybody has any ideia of what I can do here?

Yes save state name in localstorage when leaving a.b then implement your own back button in view for c.a and use saved state name?

Yeah, we already did that. I guess there’s no other option at this time.
But with the scenario that I navigate from a.b to b.a, b.b then c.a and need to go back fom c.a to a.b, what can I do? Because Module C creates his own history root and I can’t just use $ionHistory.goBack(-3).