Problem when create dynamic tab


Hi all,

I’m new with ionic, and I would like to create a dynamic tab with dynamic data.
my HTML looks like:

<ion-tabs #ionTabs>
      *ngFor="let tab of tabs"

the “tabs” in the ion-tab is gotten from Rx.js in ionViewDidEnter, e.g.

                .combineLatest(a, b, c)
                .subscribe(v => {
                   // return this.tabs
Note that a, b, c got from ngRedux

I want to let the content of tabContent render the data from the rootParams.
The length of “this.tabs” is correct,
but when get tabs data using

@ViewChild("ionTabs") ts: Tabs;

this.ts.length would become wrong (the length this.ts._tabs will be x2 or more, for example, if this.tabs.length should be 5, then this.ts._tabs.length will become 10 but not 5), and will show error Cannot read property 'length' of null when clicks other tabs

Could anyone help me? :’(
Thank you so much!