I was hoping someone could provide me an example of the $stateProvider route setup that would allow the the same url/path open in any tab?
I have the following entry which works fine in one tab (tab-a) and i get the back button in the header however if i try the same url in the other tab (tab-b) the url loads fine but the back button is missing.
I’m trying to figure out how to keep my code DRY. This implementation will be needed for other routes as well. I’m new to angular and i’m trying to figure out how ui-router is integrated with ionic.
Yeah that’s a tough one. I would imagine the ui-router is just setting one of the tabs, while the other one isn’t even in the DOM at the moment. However, I wouldn’t necessarily call this a bug, because having the exact same state, under the same url, but in two different locations is difficult to manage. To save headaches I’d probably try to avoid setting the same state in two different locations. Hopefully that helps.
I guess I’m curious why you’re having the same url /user/:userId point to two different views, tab-a and tab-b. Can you have the profile show up in just one of the tabs?
@adam i’m trying to keep my code DRY as possible. Here is my scenario.
Tab 1 - Notifications List
User click on list item and is moved to a page with more details
about the notification.
From there the user can click on a username to view that user’s profile
Tab 2 - Events List
User can click on event to view details
User can click on a username in the details and view that user’s profile page
Hopefully this makes more sense about the flow i’m trying to achieve. Twitter app does a similar thing you can end up seeing a user’s profile from the timelines tab and notifications tab.