I am trying to use three different streams to create an array of each one. For example:
[homePage, mainNavigation, loan_originators]
However, currently only mainNavigation
is being returned.
const homePage = this.flamelinkService.getData('homePage');
const mainNavigation = this.flamelinkService.getNav('mainNavigation');
const loan_originators = this.catalogApiService.get('loan_originators', qry);
return mainNavigation.pipe(
concat( homePage, loan_originators),
first(),
tap( async navResolveData => {
// navResolveData = navResolveData[0];
_log('== Navigation Data Resolver ==> ', 't', navResolveData);
if (isPlatformServer(this.platformId)) {
this.transferState.set(INFO_KEY, navResolveData);
}
}),
);
I have also tried using forkJoin, but it doesn't seem to work.
const homePage = this.flamelinkService.getData('homePage');
const mainNavigation = this.flamelinkService.getNav('mainNavigation');
const loan_originators = this.catalogApiService.get('loan_originators', qry);
return forkJoin([homePage, loan_originators, mainNavigation]).pipe(
first(),
tap( async navResolveData => {
// navResolveData = navResolveData[0];
_log('== Navigation Data Resolver ==> ', 't', navResolveData);
if (isPlatformServer(this.platformId)) {
this.transferState.set(INFO_KEY, navResolveData);
}
}),
);