How to reload page everytime when ion-tab is tabbed in ionic 4?

I have a question concerning reloading a page each time when ion-tab is clicked - even if the page is already active. If it’s possible, is it also possible to pass a value to the page?

If searched a lot but couldn’t find a solution.

The code of my ion-tabs looks like this:

<ion-tabs tabbar #myTabs id="myTabs">
   <ion-tab [root]="tab1Root" tabTitle="tab 1" ></ion-tab>
   <ion-tab [root]="tab2Root" tabTitle="tab 2" ></ion-tab>
   <ion-tab [root]="tab4Root" tabTitle="tab 3" ></ion-tab>
   <ion-tab [root]="tab3Root" tabTitle="tab 4" ></ion-tab>
   <ion-tab [root]="tab5Root" tabTitle="tab 5" ></ion-tab>

I know that ion-tabs can handle (tab)=“function($event)” but this function knows nothing about the tab the user has clicked.

I would like to reload the page all the time a tab is clicked, even the page is already active.

Can someone help?

Thank you so much for your help in advance.


I had a similar case, where i want to scroll a Page up if i click on a Tab which is already active.

You can pass specific Data in the (tab) so you know which tab was clicked. I created my tabs in a Loop, but in your case for example:

<ion-tab [root]="tab1Root" tabTitle="tab 1" (tap)="handleTap('tab1')" ></ion-tab>

Then in the handleTab i would use a Service to sent a Event on which Tab1Page is listening to perform any Method.

Thank you EinfachHaus

The (tab) in my ion-tab won’t fire when I click the tab. I used a single alert to check that.

Any hints from your side.

Thank you so much!


What about the standard (click)?