How to show / hide a ion-tab?

I have a provider that verifies the connection, and the page has a variable with a subscribe showing me when is onLine or not. Until then everything are working properly and i can show a ion-icon in ion-navbar with a *ngIf="!onLine", so when does not have a connection it shows the icon.

The problem comes in ion-tabs, I want the ion-tab only appears when have a connection, so I put *ngIf=“onLine”, but the tab appears being online or not, and worse, if I disconnect and connect again appears a clone of the tab (an extra tab equal to that with the ngIf), and another one for every time I disconnect and connect.

I tried to do with class, but it still fails to make the tab does not appear.

If someone can give me some light on this problem I would be very grateful.

Hi, I think I asked a similar question which also remains without an answer,

in case you have solved this issue please post. Thank you.