diff --git a/src/components/nav/test/basic/index.ts b/src/components/nav/test/basic/index.ts index 0fbe4bb4f8..2b675d2808 100644 --- a/src/components/nav/test/basic/index.ts +++ b/src/components/nav/test/basic/index.ts @@ -417,4 +417,6 @@ class E2EApp { } } -ionicBootstrap(E2EApp); +ionicBootstrap(E2EApp).then((componetRef) => { + console.log('ionicBootstrap', componetRef); +}); diff --git a/src/config/bootstrap.ts b/src/config/bootstrap.ts index 99f9f7e422..3375c86374 100644 --- a/src/config/bootstrap.ts +++ b/src/config/bootstrap.ts @@ -35,11 +35,14 @@ export function ionicBootstrap(appRootComponent: any, customProviders?: Array { - // call angular bootstrap - bootstrap(AppRoot, providers).then(ngComponentRef => { - // ionic app has finished bootstrapping - ionicPostBootstrap(ngComponentRef); + return new Promise((resolve) => { + cssReady(() => { + // call angular bootstrap + bootstrap(AppRoot, providers).then(ngComponentRef => { + // ionic app has finished bootstrapping + ionicPostBootstrap(ngComponentRef); + resolve(ngComponentRef); + }); }); }); }