I've encountered an issue while trying to make a nested HTTP call in resolve.ts and have implemented it as shown below.
app.route.js:
{
path: 'result/:start_date/:end_date',
component: ResultComponent,
resolve:{hnData:ResultResolver}
}
Here is the code for my resolver:
result.resolver.ts
resolve(route: ActivatedRouteSnapshot) {
return this.service.firstHttp()
.pipe(
map((data)=>{
param['data_from_firstHttp']= data.result;
param['checkinDate']=route.paramMap.get('start_date');
param['checkoutDate']=route.paramMap.get('end_date');
return this.service.searchListing(param);
})
)
And here is the code for the component:
result.component.ts
{ hnData : Observable}
Within the component, I am expecting the result from the searchListing service method but instead, I am receiving an observable.