I am working on a file encryption and upload class using Angular. Many of these operations are async and therefore the methods I wrote are returning RxJS Observables.
<
You can merge those observables using mergeMap rxjs operator and get rid of nested subscriptions.
Though there is one catch, Be aware that because mergeMap maintains multiple active inner subscriptions at once it's possible to create a memory leak through long-lived inner subscriptions.
For reference and example: https://www.learnrxjs.io/operators/transformation/mergemap.html