Building a AngularJS Status/Loading Bar

When building any type of clientside MVC application one of the first things you(and your users) will notice is the lack of the normal browser status bar. As a user I find this really frustrating because that lack of feedback makes the application feel clunky as it’s hard to see when tasks are started and completed. Initially we attempted to use toastr a notification engine that allows for large floating notifications in the top right of the screen but found the constant popups a distraction. What we actually needed was a status bar.

The code was simple and makes the app feel many times smoother. We implemented as a ‘ng-include’ in our main template.




Adding Status

The statusbar uses angulars built in event dispatcher.

That’s it, now your AngularJS app has a simple statusbar and your users will thank you for it.

NB* with the current setup your manually queueing and dequeuing the status but it might be easier to hook into your ajax calls. In AngularJS you could look at using interceptors in the http service.





Leave a Reply