Show LoadingController on open app (first tab)

Sorry if this trouble is fixed in another thread, I’ve search and not founded…

I try to show a LoadingController in my main tab (tab showed when app opens)

I put this in constructor of tab page:
let loader = this.loadingController.create({ content: “aguarde”, duration: 5000 });
setTimeout(() => {
loader.present()
}, 5);
I’ve got this error: TypeError: activeNav.getActive is not a function
So I removed and try use
1.
ionViewWillEnter() {
console.log(“ionViewWillEnter”);
let loader = this.loadingController.create({ content: “aguarde”, duration: 5000 });
loader.present();
}

2
ionViewLoaded() {
console.log(“ionViewLoaded”);
let loader = this.loadingController.create({ content: “aguarde”, duration: 5000 });
loader.present();
}

And the loading is show only I switched the tab… Has a sollution to open this loading controller when I open the app?

Tks so much

I seem to recall that the Loader component and tabs became broken in Beta 11. Check the GitHub Issues to confirm this.

Chris

Personally I found the LoadingController to be pretty buggy on beta 11.

I reworked my components to use a simple ion-spinner which achieves the same goal.

Have you tried doing the work in ionViewDidEnter?

Yes, I try with ionViewDidEnter and with the propriety fireOtherLifecycles true and false…

Both only works when I switch the tab…

tried ngAfterContentInit or others?

https://angular.io/docs/ts/latest/guide/lifecycle-hooks.html#!#hooks-overview