Child Routes and Lazy Loading
Learn Child Routes and Lazy Loading (Phase 6 · Routing (Core), Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Child routes and layouts • A route can have children rendered inside a second <router-outlet> in the parent's template: the pattern for layouts (dashboard shell with a sidebar), tabbed pages and master/detail. • A route with no component (a "componentless route") only groups children and shares a path prefix, guards, resolvers or providers. • Relative links inside children ( routerLink="settings" or "../" ) are resolved from the current route.