cgross / angular-busy

Show busy/loading indicators on any element during $http requests (or any promise).
http://cgross.github.io/angular-busy/demo
MIT License
1.44k stars 257 forks source link

Keep cg-busy visible with error responses #74

Open LeleDev opened 9 years ago

LeleDev commented 9 years ago

Hi there!

I'd like to in istruct cg-busy to stay visible (maybe showing an error message instead of the loading one) in case of request error, in order to block user interaction with not-ready content.

Is there any way way to achieve this result with cg-busy at the moment? If not, could this feature be easily added to the existing code?

Thank you in advance

benoror commented 9 years ago

You might use an http interceptor, but this is totally not related to cg-busy

LeleDev commented 9 years ago

It's quite releate, imho... Cg-busy already take care of loading status and success status... why not adding a little support for error status? It's a pretty common scenario the need of blocking stuff if something goes wrong

Mart-Bogdan commented 9 years ago

@LeleDev i suggest you can use ng-if inside your template to disable UI.

But I totally support your suggestion.

LeleDev commented 9 years ago

@Mart-Bogdan It wouldn't be the same, because in that case the controls would be completely removed... instead I just want to lock them while keeping them visible under the cg-busy semi-transparent backdrop.

I'm using cg-busy everywhere in my app, so I'd need an huge effort to achieve the same result with a non-native solution...

matpag commented 9 years ago

+1

fferraris commented 9 years ago

:+1: