Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Ionic root page & page navigation #613

Open
brodycj opened this issue Jan 10, 2017 · 2 comments
Open

Document Ionic root page & page navigation #613

brodycj opened this issue Jan 10, 2017 · 2 comments

Comments

@brodycj
Copy link
Contributor

brodycj commented Jan 10, 2017

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:

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
Copy link

Totally true. Assigning the root page inside the platform ready event has fixed my problem with sqlite plugin.

I agree with @brodybits. I guess if you assign the root page before the platform ready event is fired, and you use the plugin inside the page, it crashes.

@tomaziMegys
Copy link

tomaziMegys commented Nov 8, 2018

Actually, I'm getting this problem and was not solved by assigning the root page inside the platform ready. It just build with no erros sometimes, and if I get a error, a need to try saving many times 'til it builds it correctly. And no changes are made in the code to it simply work.

As example, I just tried to tap a "space" and save de project, the SQLite worked.
Few seconds after, I did the same, and the SQLite plugin acused the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants