AngularJS: Loading spinner during view state changes and API calls

AngularJS allows developers to create powerful web applications in a seamless, single-page experience. However, during state changes and API calls it’s important to indicate to the visitor that the next view or API response is still processing. Without a loading spinner it can feel as though nothing is happening while back-end API calls complete and Angular re-renders the view accordingly.

Here is how you can add a loading spinner to your application in under 10 minutes: