The second observable of my resolver has to use the result of the first observable. I couldn't fiure out how to pass that data to the second observable :
resolve(route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<[Project[], Owner]> {
const currentEmail = this.CurrentUserEmail();
return this.searchService.genericSearchApi('/api/searchproject', ...[//I need to pass the user here.]]).pipe(
withLatestFrom(
this.userService.getUserByEmail(currentEmail)
)
);
}
Thanks for your help!