Independent state which maintains current tab state

I am trying to create a state environment similar to instagram. So if you click on a user’s name you will see the user profile, but the tab state is maintained.

I know how to do this by creating multiple states, but curious how this is done with reusability in mind an within directives which are ignorant of the state.