How do child routes and nested router outlets work?
Model answer
A route can have a children array. The parent component contains its own <router-outlet />, and the matched child component is shown inside it. This is how you build layouts: a dashboard component with a menu and an outlet, and child routes for each section.
Paths of children are relative to the parent path, so the final URL is parent plus child.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.