Open web-dave opened 7 years ago
ng g module books --routing ng g module about --routing
But take care!! There is a bug.
ng g module books --routing -m=app.module ng g module about --routing -m=app.module
ng g c books ng g c about
<my-nav></my-nav>
<books></books>
<router-outlet></router-outlet>
@NgModule({
imports: [
CommonModule,
BooksRoutingModule
],
exports: [BooksComponent], <-- !!
declarations: [BooksComponent]
})
export class BooksModule { }
AppModule
(or use the protip while generating)BooksComponent
in app.component.html and check the devTools