Questions tagged [rxjs6]

RxJS6 is version 6 of Reactive Extensions for JavaScript, with some added changes in websocket, testing and bug fixes.

1219 questions
0
votes
1 answer

rxjs6 ActivatedRoute subscribe to observable

in app.component I need to perform an action based on the ActivatedRoute. using: Angular6, rxjs6 (with it's new syntax) import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; .... constructor (private route:ActivatedRoute){ const…
Keslavi
  • 143
  • 3
  • 14
0
votes
2 answers

show confirmation dialog using redux-observable

I'm trying to implement a delete epic with a confirmation dialog. I came up with this approach. It has the advantage of being easy to test. My question is, is this a good approach, should I worry about adding…
Anas
  • 5,622
  • 5
  • 39
  • 71
0
votes
2 answers

rxjs 6 "skip" operator missing

I've upgraded to Angular/Rxjs 6 and I've noticed that the "skip" operator on Observable is no longer there. I've not been able to find a suitable substitute, does anyone have any suggestions? Thanks!
mvcNewbie
  • 520
  • 1
  • 11
  • 23
-1
votes
1 answer

How to wait for all Observables to complete if mergeAll is set to 10?

I have problem with concurrent requests to an API. If too many requests are executed in one time (it can be 200+), they start to fail with an error. There is list of students and I need to create test assignments for them, 1 student 1 API call. I…
-1
votes
3 answers

Auto-initialize BehaviorSubject to cache global data

Simplified use case: I have Angular app with multiple modules, most (not all) of the modules use a list of airports I want to create a global-cache.service.ts and cache the airport list in BehaviorSubject which will be exposed as Observable. I only…
roman m
  • 26,012
  • 31
  • 101
  • 133
-1
votes
1 answer

How to skip subscribe result?

I have an stream changes$ that emits data: interface Data { id: number, prop: string } This stream is switched by another that makes http request. In the end I subscribe to response: .subscribe((response =>apply() ); How dont call apply()…
user15361861
-1
votes
1 answer

is it possible to avoid nested subscription?

I'm using angular and rxJS I'm pretty new to rxJS operators and can't find a way to keep everything inside a stream. My stream is pretty long so I'll get straigth to the point explaining the problem I'm dealing with I need to run parralel…
JSmith
  • 4,519
  • 4
  • 29
  • 45
-1
votes
2 answers

Property 'interval' does not exist on type 'typeof Observable'. Even though its imported

Property 'interval' does not exist on type 'typeof Observable'. Even though its imported in and I dont know why it wont work. Ive seen some posts about this involving angular 6 but this is angular 11 so I hope someone can help me figure this…
lizardcoder
  • 336
  • 3
  • 6
-1
votes
3 answers

JS6 - How can I loop through an array of objects and filter where country = UK

const arr =[ { id:1, name: 'Name', country: 'UK', }, { id:2, name: 'Name', country: 'USA', }, …
-1
votes
1 answer

How to send requests to server one after one RxJS?

How to correctly send RxJS requests, when there are 4 different API endpoints, I need to request each endpoint until previous does not return data. Schema is: Request 1 -> Return Void Request 2 -> Returned data, stop working and return data Request…
user13664319
-1
votes
1 answer

Display event emitter value in html template with async pipe

I have a child component that selects a file with a 2 way data binding called file$ so the parent can receive the selected file. The parent needs to receive the file when it is emitted, but the child also needs to display the file name in the…
BeniaminoBaggins
  • 11,202
  • 41
  • 152
  • 287
-1
votes
1 answer

How to run observer if no result from forkJoin?

I need to run observer if after one second there is no result from forkJoin: of().pipe(delay(1000), skipUntil(!forkJoin$)) .subscribe(()); It does not work for me...
user13406409
-1
votes
1 answer

Why concatMap does not work for multiple requests at once?

I have an array of objects data/ids received as parameter in the function where I should execute a post request for each element/id: fillProfile(users) { const requests = []; console.log( 'USERS.length:', users.length ); requests.push(…
k.vincent
  • 3,743
  • 8
  • 37
  • 74
-1
votes
1 answer

Perform an action when map finished with async function

In this effect I’m getting product and if this product has “childProducts” it becomes array of products. Then, on the map function there is a pop up modal for each of the products in the array. I want to make some action when the map is finished…
eladr
  • 343
  • 1
  • 4
  • 18
-1
votes
1 answer

You provided 'undefined' where a stream was expected

I am getting this in my Console. Since it's not pointing to my code I have no idea what it's all about: TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. at subscribeTo…
Mark
  • 4,535
  • 7
  • 39
  • 76