Good day.
I have a parent state in which I resolve a list, this is loaded by an http request.
This parent state has a child who must solve the first element of the parent list.
How could I solve this situation? Thank you in advance
You could try using the parent property of route as follows in the children:
ngOnInit() {
this.route.parent.data.subscribe(data => {
this.project = data.residents;
});
I solved it by loading the resolver data of the parent state in the son resolve service
@Injectable() export class OnlyUserResolve implements Resolve<User>{ resolve(route: ActivatedRouteSnapshot) { return route.parent.data.users[0];}}