title: ionic 5 tabs swipe to go back not changing tabs
body: <p>All the below testing and coding is done for Android phone.</p>
  
  <p>I have created a new tabs project using ionic tabs. And I have 4 tabs at the bottom right now. Now the problem is I clicked on another tab no the view and then try to use the default SwipeToGoBack gesture in the phone and that does nothing.</p>
  
  <p>If I go into any other page then the back gesture works fine, but when I am in the 4 pages of the tabs, it does not work.</p>
  
  <p>I tried below options:</p>
  
  <p><code>&lt;ion-router-outlet id="main" [swipeGesture]="true"&gt;&lt;/ion-router-outlet&gt;</code></p>
  
  <pre><code>IonicModule.forRoot({
      swipeBackEnabled: true
    }
  </code></pre>
  
  <p>But those did not help. I can even close the side menu bar opened by swipe back. But can not go to the previous tab by swiping back on phone. Even not able to close the app.</p>
  
  <p>If the application is opened and no other tabs were clicked and I do the swipe back gesture then the app closes, but as soon as I click on other tabs then I can not even come out of the application.</p>
  
  <p>I also tried adding back button listeners from the platform but that also did not help. I added below code part in the tabs.page.ts:</p>
  
  <pre><code>this.platform.backButton.subscribe(() =&gt; {
    navigator.app.exitApp();
  });
  </code></pre>
  
  <p>Any help on how to go back to the previous tab on swipe back gesture on phone and finally close the app if no previous tab history?</p>
  
  <p>Links already tried: </p>
  
  <ul>
  <li><a href="https://github.com/ionic-team/ionic/issues/12927" rel="nofollow noreferrer">https://github.com/ionic-team/ionic/issues/12927</a></li>
  <li><a href="https://stackoverflow.com/questions/51700879/handling-hardware-back-button-in-ionic3-vs-ionic4/51729093">Handling hardware back button in Ionic3 Vs Ionic4</a></li>
  <li><a href="https://stackoverflow.com/questions/46973693/swipe-through-segment-tabs-ionic-3">Swipe through segment tabs - Ionic 3</a></li>
  </ul>