I'm trying to use RxJS concatMap to sequence my 2 observables so that it returns the employeeID before calling the service to return the object to bind to my Mat-Table in Angular 9. But I'm not sure how to write the syntax correctly. the first observable is actually a behavior subject that I created to let components subscribe to anywhere in the app. the second is an http response from a web api.
I've been looking at the example here and trying to figure it out but just been banging on the keyboard. RxJS concatMap
//first observable (actually a Behavior Subject)
this.userService.currentEmployeeId.subscribe(empId => this.employeeID = empId)
//second observable
this.service.getMissingContractsSummary(this.employeeID)
.subscribe(
response => {
this.dataSource = new MatTableDataSource<Contractsummary>(response);
this.dataSource.paginator = this.paginator;
}
);