Questions tagged [rxjs-observables]
759 questions
0
votes
1 answer
Observable pipes
I have a question about the pipes of the observables
suppose I have the following code:
const skip$ = of(4);
const length$ = of(24);
const schoolId$ = of(1);
const source = combineLatest(skip$, length$, schoolId$).pipe(
map(([skip, length]) =>…

Jordi Baliellas Portet
- 221
- 3
- 10
0
votes
1 answer
Angular observable, how to iterate through an object with nested array to collect fields into an array
I am trying to go through my JSON object and add specific fields to their own array.
I am trying to iterate through the below object and store the 'appSupportedId' in its own array.
I am getting an ERROR
ERROR
core.js:15714 ERROR TypeError:…

Rob DePietro
- 284
- 2
- 8
- 23
0
votes
1 answer
Angular routerLink only triggers ngOnInit once
I have found several questions similar to mine, but the big part are related to params, the answers didn't help me to solve my issue. Basically the problem is the following:
Once the user logs in, the user is able to visualize his/her username in…

HeyBaldur
- 545
- 1
- 7
- 16
0
votes
3 answers
Observable to Array *ngFor saying undefined
I am new to Angular. I have a Node and Express backend pulling data from an MS SQL database. If I go to the endpoint URL it displays my data as JSON. I am running on localhost so I set a proxy for CORS. I have a class that defines the data, a…

user41814
- 19
- 6
0
votes
0 answers
Angular 6 / 7 / 8 ngbtypeahead returns matching and non matching records both
I am taking records from REST API and showing it in input type as a type-ahead feature, where I have to enter at least 3 letters before giving an API call.
This is my HTML code

Chetan Birajdar
- 461
- 9
- 22
0
votes
1 answer
How to map values from JSON-file or REST-response in Angular with service into properties of two (or more) typescript-objects?
Although I feel this answer is relatively close to my problem and got some reputation, I don't get it right. I read a lot of posts on how to use the "new" style of Observer-pattern ((...).pipe(map(...)).subscribe(...) and *ngFor="... | async") in…

Jochen Haßfurter
- 875
- 2
- 13
- 27
0
votes
1 answer
RXJS: How to get connect event? retrywhen: how to hook into execution?
When Angular tries to connect, I want to show "Connecting". I can do it on first connect, but I don't know how to do it when using retryWhen(). I need to hook into the actual execution and then do:
this.connectionStatus = "Connecting"
Current…

NoobieNoob
- 887
- 2
- 11
- 31
0
votes
2 answers
Angular 8 - keeping track of displayed components without access to URL params
I have two main components - list and detail. In the third component, which doesn't have a parent/child relationship with either of the first two components, I need to know which component is currently being used/displayed and based on that, perform…

Mandy
- 107
- 1
- 2
- 9
0
votes
1 answer
RXJS sequential HTTP request
I would like to do sequential HTTP calls and merge the responses into one and unique observable.
Problem is: the way I am doing it seems to be wrong. Indeed, I would like to merge the data from the second request into the first one, but the way I…

Synops
- 122
- 3
- 11
0
votes
2 answers
Passing and unwrapping Observable as Subject
I need to pass data from one component to another but I'm having a hard time doing so.
I have an Observable that I need to pass as Subject which is another Observable. How do I do that?
The way I currently have is not working as it gets in the…

MrRobot
- 1,001
- 1
- 14
- 34
0
votes
0 answers
Angular 8 RXJS6 Observable pre-process response before return
I have an observable that makes an API call. The API call returns an array of objects in the response.
I am using this observable in multiple places. In most cases, I want the object in the response.
However, in the case of CanDeactivate, I need to…

pengz
- 2,279
- 3
- 48
- 91
0
votes
1 answer
Angular8 RXJS CanDeactivate wait for result of observable before deactivation
I am attempting to use a CanDeactivate guard to detect when a user navigates away from the component. The purpose is to #1 check if the current user owns the 'Is Being Edited' lock on the record, and #2 if so, call an observable to update the…

pengz
- 2,279
- 3
- 48
- 91
0
votes
0 answers
distinctUntilChanged under Race observable not working as expected
We want to buffer the data until the below two events are reached such as the debounce time reached to 5 or value is changed. But based on the below test we seeing it is not working properly.
The behavior I want to achieve is.
a) When there is a…

user1595858
- 3,700
- 15
- 66
- 109
0
votes
2 answers
Combining observables in series & parallel to fetch data from multiple APIs
I am trying to check the validity of a function I have written in Typescript, in congruence with RxJS observables, that fetches some bookings from one service and then for each booking fetches its corresponding location and activity from another…
0
votes
1 answer
How to subscribe multiple observable in rxjs 6 ? do is not a function in rxjs 6
In rxjs 5.5.12, I created a login() to subscribe with multiple observable by do()
login(userEmail, userPassword).subscribe((response) => {
console.log(response);
if (response === 'something') {
// some actions
} else {
// some…

Morton
- 5,380
- 18
- 63
- 118