Questions tagged [rxjs-observables]

759 questions
0
votes
1 answer

How to use combineLatest with flatMap in rxjs6?

I use the code with rxjs 5.5.12 in React Native, it works. In rxjs 5.5.12: // the function will return Observable rxInit() { return Observable.combineLatest( myObservable1, myObservable2, ).flatMap((result) => { …
Morton
  • 5,380
  • 18
  • 63
  • 118
0
votes
2 answers

RxJS scan to accumulate database results using filter and offset as url parameters

I have two behaviorSubjects offset = new behaviorSubject(null) filter = new behaviorSubject(null) I do the following.. combineLatest( this.offset, // last item in the list, ID for example this.filter // can be any…
user12163165
  • 555
  • 8
  • 12
0
votes
1 answer

rxjs/angular - how to merge normalized data from service?

I am new to Angular and RXJS - I'm trying to return normalized data from a rest api and assemble the hierarchy on the client. I created this stack blitz which is a really basic version of what I'm trying to accomplish: …
0
votes
0 answers

unable to convert an Observable into a ConnectableObservable

I have a BehaviorSubject. I am trying to convert its Observable into a ConnectableObservable but I am getting error publishBehaviour is not a function. What am I doing wrong? this.questionsArray$.publishBehavior is not a function TypeError: …
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
0
votes
1 answer

Wait for an observable's value (as a list) to call another observable using each member from the list?

I am using 3 endpoints for my application, 1 of the endpoints depends on other of the endpoint's response, which is a list, then I need to use each item of the list in order to use the other endpoint, let's call them epA, epB and epC, epA returns a…
0
votes
1 answer

Angular Unit Test: How to cover activity inside service stub method subscriptions

I'm writing unit tests for one of my Angular component methods which assigns a property the response value from a service call and calls another method. I have my service stubbed with response data and I subscribe to it inside my test with the…
Steve Whitmore
  • 903
  • 1
  • 9
  • 22
0
votes
1 answer

Observable Is not binding Angular 6

I have been working on another question here and the helper has gone a little quiet and I need to get a solution on this pretty quickly. See Here For More Information I have implemented the new code and find that the array is returning 'false' to…
Apex
  • 227
  • 4
  • 15
0
votes
1 answer

Angular 7 Transform Observable response to a new observable object

I have an api which responses like this and I am using rxjs observables [{ "error": "error_1", "types": [ { "type": "new_type" }, { "type": "old_type" } ], "date": "2019-08-29" }] I need to transform it…
vashlor
  • 53
  • 7
0
votes
1 answer

sending get with attached observable with angular and ionic framework

I have spent hours trying different ways to get this Observable to work in ionic / angular. I have tried different setups and interfaces to plugin to Observable which has properties which are strings. I have tried plugging in JSON as an interface. I…
sasy solutions
  • 179
  • 1
  • 9
0
votes
1 answer

wrapper observable event on top of http call

I have a function which returns an object. Instead of returning the object synchronously, can I have it returned inside an observable which can be later resolved using callbacks (similar to an http call). Caller Function: getResource() { …
0
votes
1 answer

How to convert sequentially emitted data to a single array

So, I am using ngrx store for getting data. Once I select the property I want from the store, after then I subscribed it to get observable stream. My data contains array of object. So in this array of objects, I have to do some modifications in some…
0
votes
1 answer

Awaiting for two methods that return observables in angular

I have two methods that make api calls and return observables. private method1(): Observable { return homeService.call.get(); } private method2(): Observable { return userService.call.get(); } Then I have the following two…
heisenberg
  • 1,172
  • 6
  • 14
  • 31
0
votes
1 answer

Probably race conditions

Hi guys I try to solve one bug. After click on button is timeinput sometimes empty. When I use delay() all is ok. But without I have empty input when I create new visitor. export const visitListStartFetchAfterChange: Epic = (action$, store) => …
-1
votes
2 answers

How to, in 1 function, perform operations on 2 separate data collections in 1 function in RxJS?

How to perform operations on 2 separate data collections in 1 function in RxJS so that it returns observable -> as for now it returns Void ? This function is running inside Service of course, and finally I want to subscribe to it in my component. I…
Piotr Deja
  • 31
  • 1
  • 6
-1
votes
2 answers

Angular RXJS optimize nested subscribes

Hey there I've an update function call with nested subscribe, interdependent, just that on the success of the parent call subscribe the inner one updateSelectedScopes() { let params: any = { userInterface: this.userInterface, targetId:…