Last active
February 11, 2018 19:08
-
-
Save kutliev/5c998c9a3775bf7407fad5e52ea9e54b to your computer and use it in GitHub Desktop.
Routing
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
const appRoutes = [ | |
{ path: '', component: DashboardComponent }, | |
{ path: 'spots', component: SpotcardComponent }, | |
{ path: 'spots/:spot_slug', component: SpotcardComponent }, | |
{ path: 'spots/:spot_slug/edit', component: SpotcardeditComponent }, | |
{ path: 'spots/:spot_slug/addevent', component: EventcardeditComponent }, | |
{ path: 'spots/:spot_slug/events/', redirectTo: 'spots/:spot_slug' }, | |
{ path: 'spots/:spot_slug/events/:event_slug', component: EventcardeditComponent }, | |
{ path: 'createspot', component: SpotcardeditComponent }, | |
// otherwise redirect to home | |
{ path: '**', redirectTo: '' } | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment