Category "rxjs"

this.activatedRoute.params is undefined in Angular

I have routing in app-routing.module.ts I want to get playerId and teamId from the router but it returns undefined in the console as I subscribe to it in AppCom

Angular canActivate guard - conditional based on a selector

I have a CanActivate guard service that has been working fine, until a new requirement came along. The original code was something like this: canActivate( r

async template bind from subscribe angular 13

I'm trying to bind data on subscribe on ngOninit, here is the page profile.component.ts below. export class ProfileComponent implements OnInit { public userDe

I can not subscribe on mergeMap observable in angular 13

I want to implement a connexion senario based on Roles in angular. When the user click on CONNEXION button after filling in the form ( username - password), two

Better alternative to using concatMap twice within pipe?

I want to execute a pre-defined promise (promise 2) recursively after another promise (promise 1) resolves to see when my connection to a peripheral device retu

How do i add a property from one Observable to the second Observable?

I am trying to add an address Observable to a user Observable. export interface Address { country: string; state: string; city: string; street: string; zip

How do I upload multiple files in array in Angulars reactive forms, from an API and send the data as a number to the array

***ERROR IMAGE: *** https://ibb.co/JKd0hV3 Who can help me solve this problem, I get a 490error whenever I run this code. Am I missing something or need to refa

Test Typescript Service : Multiple Subscription on one Observable

I am having a problem performing a test on a typescript service. I have a function that returns an observable. I use .subscribe() to look at the result and veri

NestJS WebSocket

I use angular in the front end where I am learning to use rxjs-websockets. In backend I use nestjs, where i want to learn to use websockets. But every tutorial

Wait for the reading of a csv file

I'm trying to read a csv file in Typescript with "csv-parse" library by creating an observable; the following code use fs.createReadStream to read the file; I w

RXJS data manipulation

I am trying to find the reactive way of manipulating data in an array of objects. In the array below, I want to determine the low score in groups of four and a

Rxjs only execute last item in queue with concatMap

I am using NGRX with RXJS. In the effects layer, I am using a concatMap to queue my requests, however, once the latest request is complete, I want to execute th

how to grab the payload inside of withlatestfrom with ngrx?

hi i have the following code where the selector requires an index to grab a value from the store, I use withLatestFrom to grab this value from the store only th

Angular not passing object to html page

I am having issues with learning angular, I didn't use to have these problems before, but now when I do these demos things work great until I switch from using

Angular - Async pipe in ngIf and text binding will not display first emitted value

I have very simple component template: <button (click)="emitNextValue()">Next Value</button> <p *ngIf="text$ | async"> {{ text$ | async }}

reactive programming in react

I have a fundamental question about reactive programming in react. As you know, a react component re-renders only if one of its props changes and does not aware

Container is not defined problem in React

I'm trying to learn React but this 'Container' is not defined and I don't know why I got this error, even though I did everything in the course Here is App.js i

How to use filter with two Observables and return only one in rxjs

I have a part of code that checks if two observables are up to date and returns the second observable if they are: combineLatest([$source1, $source2]).pipe( f

Use an observable inside of an interceptor

I want to write an interceptor to add an auth token to all the requests. My token comes from a lib, angularx-social-login, that only provides an Observable to g

.toPromise() and lastValueFrom() in rxjs

I have this observable createMyRecord(): Observable<myRecord> { return of(TEMPLATE_DB).pipe( mergeMap((template) => doTask(template