Answer the question
In order to leave comments, you need to log in
Angular 2 nested components and routes?
Good day, my dear friend.
I have the following problem: let's say there is the following application structure:
- AppComponent
-- TeamComponent
--- TeamMemberComponent
---- TeamMemberDetailsComponent.
/
/team/:teamId
/team/:teamId/member/:memberId
/team/:teamId/member/:memberId/details
{
path: 'team/:teamId',
component: TeamComponent,
resolve: {
members: MembersResolverService
},
children: [
...
]
}
Answer the question
In order to leave comments, you need to log in
if the child component requires data from the parent, then you probably need to make a preloader or hang *ngIf on the child component until the data in the parent is loaded and displayed.
Or get rid of such nesting of components
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question