mergemap

Using RxJS to build data from multiple API calls

百般思念 提交于 2021-01-27 11:28:03
问题 I'm trying to get a better understanding of how to use RxJS Operators to solve a specific problem I'm having. I actually have two problems but they're similar enough. I'm grabbing a bunch of documents from an API endpoint /api/v3/folders/${folderId}/documents and I've setup services with functions to do that, and handle all of the authentication etc. However, this array of document objects does not have the description attribute. In order to get the description I need to call /api/v3

Using RxJS to build data from multiple API calls

℡╲_俬逩灬. 提交于 2021-01-27 11:27:50
问题 I'm trying to get a better understanding of how to use RxJS Operators to solve a specific problem I'm having. I actually have two problems but they're similar enough. I'm grabbing a bunch of documents from an API endpoint /api/v3/folders/${folderId}/documents and I've setup services with functions to do that, and handle all of the authentication etc. However, this array of document objects does not have the description attribute. In order to get the description I need to call /api/v3

¿How exactly does the mergeMap operator work and in which cases is it used?

倖福魔咒の 提交于 2020-06-01 06:07:31
问题 Before coming here I have read the official documentation of Rxjs and some other pages but I am still not clear. What I understood is this: It is used to "join" 2 observables and thus obtain a single observable as a result, I also saw that it is used to "flatten" an observable (I am also not very clear). Now ... I have days trying to program a user registry using Angular and Node.js with Express and I found a little tutorial which I decided to use and it has this code: import { Injectable,