0
I have the following template with two tabs
<ion-tabs tabsPlacement="top" color="primary" #entradaSaidaTabs >
<ion-tab [root]="tabReceber" [rootParams]="paramsChart" tabTitle="Entrada"></ion-tab>
<ion-tab [root]="tabPagar" [rootParams]="paramsChart" tabTitle="Saída"></ion-tab>
</ion-tabs>
The variable passed via rootParams, paramsChart
, receives the data of an api through the function carregaMovimentacoes()
.
paramsChart: any;
ionViewDidLoad() {
this.carregaMovimentacoes();
}
When the page is active, only the second tab shows the list with the data, the first one remains blank. The strange thing is that they both receive the same variable via rootParams, but in the first tab it is undefined
, while in the second, she has the list with the data.
ionViewDidEnter() {
this.paramsChart = this.navParams.data; // Recebe o os parametros da pagina raiz
}
How to display the list with the data also in the first tab?