Skip to content

Instantly share code, notes, and snippets.

@EKliptus
Last active August 7, 2020 16:39
Show Gist options
  • Save EKliptus/2d633b12f1d72414cd350ebf18603c7b to your computer and use it in GitHub Desktop.
Save EKliptus/2d633b12f1d72414cd350ebf18603c7b to your computer and use it in GitHub Desktop.
My personnal way of testing the Angular app loading spinner

My personnal way of testing the Angular app loading spinner

In main.ts Replace the block :

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));

by :

(
  async () => { 
    await new Promise( resolve => setTimeout(resolve, 1000) );
      platformBrowserDynamic().bootstrapModule(AppModule)
        .catch(err => console.error(err));
  }
)();

For temporary test/demo only, don't commit this code !

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