Simplified routing in tutorial example Updated ngmodule guide and ngmodule faq with routing module prose
15 lines
382 B
TypeScript
15 lines
382 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule } from '@angular/router';
|
|
|
|
import { ContactComponent } from './contact.component';
|
|
|
|
// #docregion routing
|
|
@NgModule({
|
|
imports: [RouterModule.forChild([
|
|
{ path: 'contact', component: ContactComponent }
|
|
])],
|
|
exports: [RouterModule]
|
|
})
|
|
export class ContactRoutingModule {}
|
|
// #enddocregion
|