Angular pre-bootstrap (first screen) bootloader animation freezes during bootstrap

Simple demo here: https://plnkr.co/edit/IA0Bs5VH9WwVbLlKPQ6X?p=preview (I used the official angular.io/docs demo app)

Problem : first screen loader (i used loader.svg) animation freezes for a second during Angular App bootstrap

The process will look like this: open the page, the svg loader animation starts -> the loader animation freezes -> reload the loader animation -> Angular app load, load with load

Freezing is more obvious in this demo: http://iarouse.com/dist-angular2-material/v1/

<my-app>
  <!-- the loader -->
  <div id="loader-container"></div>
</my-app>

      

My real app is bigger and the initial bootloader animation freezes for a few seconds during the bootstrap process, which is disappointing

Any thing I can do to make it smooth?

+3


source to share


1 answer


I had your problem because I was drawing an image with a gif spinner. I tried the solution posted by @bviale and it worked.



Just using code based at https://www.w3schools.com/howto/howto_css_loader.asp and placed between the tag app-root

.

0


source







All Articles