Last active
August 4, 2018 10:07
-
-
Save nathan-lapinski/a164458a81e600d47f28aa6dc94ae064 to your computer and use it in GitHub Desktop.
Example router configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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