title: How to add tab animation on change in Ionic 4?
body: <p>I want to add navigate forward and backward animation on tab switches.</p>
  
  <p>I want to replicate the current state of Facebook's app tab navigation animations.</p>
  
  <p>I have currently tried adding a method onto the individual tab to call a function that calls navigate forward.</p>
  
  <p></p>
  
  <pre><code>&lt;ion-tab-bar slot="bottom"&gt;
    &lt;ion-tab-button (click)="goToListTab()" mode="md"&gt;
      &lt;ion-icon name="list"&gt;&lt;/ion-icon&gt;
      &lt;ion-label&gt;Orders&lt;/ion-label&gt;
    &lt;/ion-tab-button&gt;
  
    &lt;ion-tab-button (click)="goToNewTab()" mode="md"&gt;
      &lt;ion-icon name="add"&gt;&lt;/ion-icon&gt;
      &lt;ion-label&gt;New Order&lt;/ion-label&gt;
    &lt;/ion-tab-button&gt;
  
    &lt;ion-tab-button (click)="goToAccountTab()" mode="md"&gt;
      &lt;ion-icon name="person"&gt;&lt;/ion-icon&gt;
      &lt;ion-label&gt;Account&lt;/ion-label&gt;
    &lt;/ion-tab-button&gt;
  &lt;/ion-tab-bar&gt;
  </code></pre>
  
  <p></p>
  
  <p>and my .ts file has the functions that call navigate. I included only one to simplify.</p>
  
  <pre><code>goToAccountTab() {
      this.router.navigateBack('/tabs/account');
  }
  </code></pre>
  
  <p>On goToAccountTab I expected it to navigate to the account tab with the navigateBack animation, but it successfully goes to the account tab but does not perform the navigateBack animation.</p>