Hello guys.
I have a component which has tabs. The default tab’s controller sometimes fires twice, depending from where it is called.
The way i’m calling it is by:
this.navCtrl.push(TabsPage, id: id});
I get the same problem either on Android device or on browser testing.
Anyone else has this problem? Thanks for the help.
import { Component } from '@angular/core';
import { NavParams } from 'ionic-angular';
@Component({
selector: 'tab1',
templateUrl: 'tab1.html'
})
export class Tab1Page {
constructor() {
console.log('tab1');
}
}
export class TabsPage {
userId: any;
noteId: any;
tab1: any;
tab2: any;
tab3: any;
tab4: any;
constructor(public navCtrl: NavController,
public alertCtrl: AlertController,
private noteService: NoteService,
private userService: UserService,
private loadingCtrl: LoadingController,
public params:NavParams) {
this.tab1 = Tab1Page;
this.tab2 = Tab2Page;
this.tab3 = Tab3Page;
this.tab4 = Tab4Page;
}
}