Refresh tabs view after adding a new dynamic tab

Hi,

I’m using Ionic tabs in my application. some tabs are generated from a database (category table). those tabs will use the same component, just a different navigation parameter.

When a new category is added ,edited or deleted i need to remove the tab from the view.

Therefor my tabs component subscribed to an event “category:created” and tabs should be refreshed.

Instead i’m having duplicates in tabs while the console.log proves that the array is correct. A slice or a pop on the array would correctly change the array but the view would not be updated.

I though i could use changeDetectorRef but same problem.

Any ideas what i’m missing?

Check the full code and screenshots on stackoverflow