Enable back button when moving between ion-tabs

Does anyone no how to navigate between ion tabs and enable history between separate history stacks for example:

I navigate from say tab A => B, tab B is moved to inner page of tab B using a unique ID to get details about an item from tab B, but there is no way of navigating back to A and resetting the history on tab B, so that tab B is at its root state and also get a back button on tab B to go back to tab A.