Skip to content
Advertisement

Tag: observable

RxJS: Modify Observable array before subscribing

I’m fetching data (students via getStudents()) from an API which returns an Observable. Within this result I need to get data from two different tables and combine the result. Here are my simplified interfaces: I now need to fetch all students and add the respective school and classroom for each student via the foreign keys school_id and classroom_id. My current

how to run subscribe sequentially in observable

I want to run code sequentially but I was wondering how this works, for example, I have a method that includes two observable and some fields. I want to run the first observable completely then the next field values check and after that the last observable method: but at the current stage step 2 completed first and step 3 next

is there any workaround for returning the value of res from readCsv() method instead of undefined?

the scenario is i am having the file uploader, which accept .json,.csv file after having file, If i clicked on upload button ,then homeComponent call the service dataparser , which is having two function readJson readCsv, and readcsv function returning the observable other one returns array ,this is simple i have to call the both function on if else and

rxjs observable.pipe(take(1)) vs toPromise

Recently I’ve been moved to a new project which uses angular 6 as frontend framework and spring for REST services. The project is in development for 2 years now and what I’ve observed was that almost all HTTP request made with angular HttpClient is then piped to take filter from rxjs. All REST APIs emit only one value. There’s no

Advertisement