Parameters with Tabs


#1

Hello !

I don’t understand one thing with tabs.
I create a dynamic tabs and put a rootParams.

<ion-tabs>
    <ion-tab *ngFor="let journee of journees" tabTitle="{{journee.date}}" [root]="rootDetail" [rootParams]="journee"></ion-tab>
</ion-tabs>

When I click the first time on tab, the parameters are send.

My problem is when I click on the active tab. The parameters sent are empty so the data on my page are missing.

I don’t understand this behavior.

Did I misread the documentation ?

Thanks.


#2

To avoid problems like this, I prefer avoiding NavParams for any situation other than pushing a new page onto the navigation stack. Instead, I store whatever information is needed in a shared context service and use that to communicate instead.


#3

Thank you for your idea but I resolve my problem
https://github.com/driftyco/ionic/pull/11084

It was a problem in a ionic-angular component tabs !