I am trying to call nested HTTP call in resolve.ts. and implemented in the following way.
app.route.js:
{
path: 'result/:start_date/:end_date',
component: ResultComponent,
resolve:{hnData:ResultResolver}
}
following is my resolver code
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 the component code
result.component.ts
{ hnData : Observable}
Here in the component, I am expecting the result from serchListing service method instead I am getting observable.