DEV Community

Discussion on: Angular: How to easily display loading indicators

 
johncarroll profile image
John Carroll

If it is a heavy http request you will be doing this twice, unless you use a shareReplay(1) or a ReplaySubject(1)

Depends on the observable.

Well, what I mean is that we may have a problem here, right?

I can't answer that for you. I'm not familiar with your project. If you're unsure how to use observables, you can always just stick to promises (or transform observables to promises with toPromise()).

I'll note that Angular's HttpClient returns observables which complete after the request resolves. If you're using it, this isn't something you need to worry about.