What is the function of daughter routes at the angle?

Asked

Viewed 149 times

1

Does the angular daughter route function serve only to render the daughter route component on the parent route component? Because I wanted to do the exact opposite. I would like when I go from the parent route to the daughter route, I would like to render on the screen only the daughter route template. There is how to do this?

{ 
   path: 'my-curriculum', component: MyCurriculumComponent, 
   children: [
      { path: 'general-information', component: CurriculumFormComponent },
      { path: 'job', component: CurriculumFormComponent },
      { path: 'education', component: CurriculumFormComponent },
      { path: 'extracurricular-activity', component: CurriculumFormComponent }
  ]
} 
  • The template of my-curriculum Is it different from the daughter routes? If it is, Voce can make a loadChildren and within the route module of this component the exclusive template for daughter routes

  • Or Voce can do the MyCurriculumComponent be the main template from within the daughter route {path: '', component: SeuComponent}be the main route that would use the Mycurriculumcomponent template

1 answer

0

If I understand your question, just add the router-outlet component in the component that has the daughter routes, the Children routes serve to be rendered inside the parent component, thus creating an internal navigation in the component

Browser other questions tagged

You are not signed in. Login or sign up in order to post.