Reset a tab after going to different tab

My app has 4 tabs (A, B, C, D). Tab D contains a list. Touching a list item goes to the detail page. While on the detail page, when I go to any other tab, then back to D, it still shows the detail page instead of the list. I’d like it to ALWAYS show the list every time I go to tab D, no matter what I did in D before. Same for the other tabs.

How do I do that? Thanks.

Found a solution here Ionic Tabs Clear history after naivgation
In the tabs page, add an ionChange attribute like so…

<ion-tabs (ionChange) = "tabChanged($event)">

and in the code-behind, add the following…

    switch ($ev.tabTitle) {
      case "Tab A":
      case "B":

Hope this helps.