angular-busy
angular-busy copied to clipboard
cg-busy with an Http Interceptor
The idea is to eliminate the need for a programmer to manually set cg busy promises. Instead, have an http request interceptor push each http request promise to a cg busy tracked array. In theory, cg busy will show, and hide once all promises are fulfilled. However this does not work, cg busy will not show, and here is the plunker:
http://embed.plnkr.co/PdM1mghUTUMYmUatj9Fu/
Just click on the bottom button "Submit Http Requests", you will see that cg busy does not show. The first 2 buttons show cg busy but do not involve the http interceptor
Maybe I am going about this the wrong way, but it should work shouldn't it?