I am using resolve with routing in one component but in resolve, one HTTP call is dependent on other Promise call.
resolve(){
return this.storage.getUser().then( user => {
this.getVendorDetails(user.login);
});
}
getVendorDetails(loginId) {
return this.http.get('http://localhost:8080/user/getVendor/' + loginId);
}
In component when I am trying to get the data from ActivatedRoute
ngOnInit() {
this.activatedRoute.data.subscribe( data => {
console.log(data);
});
}
I am getting undefined. Maybe I'm missing something in the resolve function.
How can I get the getVendorDetails() response into ngOnInit() using ActivatedRoute.