LynxSplashScreen
Keeps the app's splash screen, angular.json's splash, up until the app's first screen is ready, then fades it out. import { LynxSplashScreen, provideSplashScreen, type SplashScreenOptions, type SplashScreenHide } from '@blotch/angular-lynx';
Usage
An app whose first screen waits on something other than the router hides it itself:
The phone takes a splash screen down as soon as the app draws its first frame. In an AngularLynx app that frame would be empty: the app hasn't run yet, and its first screen may have work to do before it can draw, such as restoring a signed-in session from LynxSecureStorage or running a lazy route's guard. So the apps ng build --platform makes keep it up until the app hides it here.
API
provideSplashScreen()
Says when the splash screen goes. Without it, it goes at the first frame Angular draws.
'afterFirstNavigation' needs the router: it throws without provideRouter().
LynxSplashScreen
The apps also take the splash screen down five seconds after they start, whether or not the app has hidden it, so a first screen that never settles can't leave the app behind its logo.
Related
- The splash screen: the
splashoption - Splash screen example
- Know when the first screen is drawn, in an app of your own
