I have created an app with a homescreen listing a number of groups. For each group I have several tabs, say a members tab, an event tab and a home tab going back to the list of groups. I have set this up with an abstract state group with URL /group/:gid that takes a group id as parameter. The tabs with states group.members and group.events then need to show members or events for the last selected group.
If I set this up without further “logic”, only the first tab that the homepage directly links to will display the correct group. The other tab will remember its previous setting/URL and show the last/previous selected group.
My question is this: is there a way to have all the tabs take the parameter of the abstract state that the previous tab had? I tried things with clearHistory and such but that didn’t work.
I got it to work in a way by storing the last selected group id in a service and checking that in the controller with BeforeEnterView. But this does not seem a very elegant solution and in IonicView on my iPhone4 you really notice the page redirect (without Ajax calls).
Sorry for crossposting, I also created a stackoverflow question, but that didn’t help yet. Maybe the experts lurk here