DEV Community

Discussion on: Angular: How to easily display loading indicators

Collapse
 
cname87 profile image
cname87 • Edited

Very nice I'm using it and it's sweet.

BTW, it appears that an observable returned from fn, as passed in isLoadingService.add(fn), must be asynchronous i.e. in a fail mode I was passing 'of([])' instead of an httpClient observable and it didn't remove the loading indicator, whereas when I pass in 'scheduled(of([]), asapScheduler' it did.

Collapse
 
johncarroll profile image
John Carroll • Edited

Thanks! I'm pretty happy with how much it's cleaned up my code.

Also, that sounds like a bug. Can you open an issue in gitlab.com/service-work/is-loading ?

Collapse
 
cname87 profile image
cname87

Will do

Thread Thread
 
johncarroll profile image
John Carroll

Great bug report. Fixed in v3.0.2. gitlab.com/service-work/is-loading...