angularjs - loading icon on bootstrap modal with interceptors -
i trying implement loading icon every rest api call in angularjs application. solution in thread worked great me except in 1 scenario. implementing loading spinner using httpinterceptor , angularjs 1.1.5
the scenario have bring bootstrap modal parent page. have loading icon appear on modal when processing request. instead loading icon appears on parent page in background of modal. please advise how icon load on modal (perhaps disabling 1 loading on parent page) incase modal opened parent.
edit:
trying use 2 spinner divs achieve this.one @ parent level. other 1 @ modal html.
#parentdiv, #modaldiv { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1100; background-color: white; opacity: .6; } .ajax-loader { position: absolute; left: 50%; top: 50%; margin-left: -32px; /* -1 * image width / 2 */ margin-top: -32px; /* -1 * image height / 2 */ display: block; } have index.html loads parent pages. <div id="page-wrapper" style="overflow:hidden"> <div ui-view style="overflow:hidden"></div> <div id="parentdiv" loader> <img src="images/spinner.gif" class="ajax-loader"/> </div> </div>
on modal html spinner:
<div class="container-fluid > <div id="modaldiv" loader > <img src="images/spinner.gif" class="ajax-loader"/> </div> <div class="col-md-4"> <div class="form-group"> </div> . . . . </div> </div>
Comments
Post a Comment