Sn0opr Sn0opr - 1 year ago 89
AngularJS Question

How to show a loading indicator when loading the app at the first time

I have to load many files for my AngularJs single page application, like angular.js, jquery.js, bootstrap.js, bootstrap.css, some_plugins.js, my_main.js and others,

It take some time to load the entire app, so I want to show a loading indicator (a spinner for example) in a void page until all the js and css files load and then display the content.

Answer Source

For Angular Apps use Angular Loading Bar. Looks like this.

  • Would apply to whenever an XHR request goes out in angular
  • Can specify which request to not display loading icon
  • Only displayed when the request causes user to wait
  • Can be styled to your liking
  • Injected into the services module and just works
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download