Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple router config
const ROUTES: Route[] = [
{ path: 'home', component: HomeComponent },
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'redirectMe', redirectTo: 'home', pathMatch: 'full' },
{ path: 'users/:userid', component: UserComponent,
children: [
{ path: 'notes', component: NotesComponent },
{ path: 'notes/:noteid', component: NoteComponent}
]
},
{ path: 'secondary1', outlet: 'sidebar', component: Secondary1Component },
{ path: 'secondary2', outlet: 'sidebar', component: Secondary2Component },
{ path: '**', component: PageNotFoundComponent },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.