Skip to content

Instantly share code, notes, and snippets.

@nathan-lapinski
Last active August 4, 2018 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathan-lapinski/a164458a81e600d47f28aa6dc94ae064 to your computer and use it in GitHub Desktop.
Save nathan-lapinski/a164458a81e600d47f28aa6dc94ae064 to your computer and use it in GitHub Desktop.
Example router configuration
import { RouterModule, Route } from '@angular/router';
const ROUTES: Route[] = [
{ path: 'home', component: HomeComponent },
{ path: 'notes',
children: [
{ path: '', component: NotesComponent },
{ path: ':id', component: NoteComponent }
]
},
];
@NgModule({
imports: [
RouterModule.forRoot(ROUTES)
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment