How to show Loader for $http calls in AngularJs ?
Hello Readers !! In this post we are going to see how we can add a loader for $http calls in our angular applications. This loader will be shown whenever our angular application will send some call to server. I am assuming that you are aware of basics of AngularJs, if not then please go through the AngularJs official Developer Documentation. So, lets begin, first of all we will be making simple loader UI with HTML and CSS . So our HTML will look somewhat as shown below. <div id="loader" class="loader" loading> <span class="fa fa-spinner fa-pulse fa-2x fa-fw loader-align"></span></div> Here I have used font-awsome’s spinner icon . You can keep same or can build your own loader/spinner, somewhat like this . Now let’s move to CSS part. Our loader should cover whole area of page and should not allow any actions unless all calls to server are finish. All we need to have div which will be having height and width 100% and z-inde