I have a resolver in my routing module
{
path: 'path1',
component: FirstComponent,
resolve: {
allOrders: DataResolver
}
}
And then in my resolve function there is
resolve(): Observable<Array<string>> {
return this.serviceA.getAllfooNames()
.map(result=> {
/* result is an array of strings*/
return this.serviceB.getAllBarNames(result[0])
/*orders is also supposed to be an array of strings*/
.map(orders=> return orders)
});
}
}
I want the value orders to be stored against the allOrders key. I want pass orders array as data in the ActivatedRoute snapshot. Please Help.