Best practices about app initialization


#1

Hi

I’ve an app with many templates html.
When my app starts, all these templates are loaded asynchronously. So the user have to wait for the app to be completely initialiszed
I’d like to keep the splashscreen while every file is not loaded completely. Is it possible? Or is there any best practices about that?

Thanks,
Sylvain


#2

The splash screen is a usual method.

You have two options.

  1. Cordova Splash screen plugin, find it here: http://www.gajotres.net/useful-cordova-plugins-for-your-ionic-application-examples/2/

  2. Pure JavaScript Splash screen: http://www.gajotres.net/using-views-events-to-create-javascript-pure-ionic-splash-screen/

Second example will wait for Ionic to initialize everything before hiding splash screen


#3

Thanks :smile:

But I didn’t find how it really works. The SplashScreenDelay parameter is not respected and the splash screen is hidden whatever I do with cordovaSplashscreen