I'm using promise.all in my resolver, it works, but now, I don't want an array of promises but an object, but I can't find how to do it.
This is my try:
resolve(route: ActivatedRouteSnapshot): Promise<any> {
return Promise.all([
this.service1.getAll(),
this.service2.getAll(),
this.service3.getAll()]
.map((result) => {
first: result[0],
second: result[1],
third: result[2]
})
)
}
As you can see I want to convert the array into an object with key - value
how can I map the result to get an object instead the array?
