-
Notifications
You must be signed in to change notification settings - Fork 715
Open
Description
From #594 (comment) by @rodineijf:
Hi @brodybits, by default the attribution of rootPage on ionic 2 is on declaration of var rootPage. I can solve my problem moving the rootPage attribution to the platformReady on app.component
initializeApp() { this.platform.ready().then(() => { this.rootPage = MyPage; StatusBar.styleDefault(); Splashscreen.hide(); }); }
With a quick search I think the following resources may be relevant:
- http://www.joshmorony.com/a-simple-guide-to-navigation-in-ionic-2/
- http://www.gajotres.net/ionic-2-a-page-anatomy-part-1-the-root-component/
- https://forum.ionicframework.com/t/go-back-to-the-root-page-ionic-2-typescript/49861
- http://stackoverflow.com/questions/36664412/setting-root-page-in-ionic2-and-angular2-app-based-on-an-asynchronous-event
I think the root cause is the requirement to wait for the deviceready
event in Cordova. This has been a stumbling block in so many cases and is especially bad for working with Ionic and other Angular apps.
josebailo