Child Routing
Opened this issue · 3 comments
web-dave commented
- Generate a
BookListComponent
into your Books Module - Set
/books
as a root of ChildRouting - Don't forget to add a
router-outlet
tobooks
Component - Check the DevTools and the hints!
web-dave commented
generate
ng g c books/book-list
web-dave commented
app-routing.module.ts
const routes: Routes = [
{
path: 'books',
component: BooksComponent,
children: [{
path: '',
component: BookListComponent
}]
},
...
];
web-dave commented
books.component.html
<p>
book works!
</p>
<router-outlet></router-outlet>