// #docplaster import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; // CLI imports router // #docregion child-routes const routes: Routes = [ { path: 'first-component', component: FirstComponent, // this is the component with the in the template children: [ { path: 'child-a', // child route path component: ChildAComponent // child route component that the router renders }, { path: 'child-b', component: ChildBComponent // another child route component that the router renders } ] }, // #enddocregion child-routes @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) export class AppRoutingModule { }