@jsmythe wrote:
I added the code
this.callHTTP()
to the MyApp constructor in app.components.ts whereasync callHTTP(){ await this.doHTTP(); }
doHTTP(){…} // set this.rootPage and transfer to another page when doneapp.html just contains
<ion-nav [root]=“rootPage”>When the app starts it displays a splash screen and then the app.html screen. It doesn’t transfer to another page until the constructor finishes. I’ve tried this with and without async/await but the same thing occurs. I know I can’t use the async keyword on the constructor so that’s not an option.
Is there any way to display the splash screen until the page transfer is ready and not show app.html and do the page transfer until then? Alternatively, is there any way to prevent the constructor from completing until the HTTP call is finished since I could put the page transfer at the end of the constructor?
Posts: 5
Participants: 2