Skip to content

Instantly share code, notes, and snippets.

@munkacsitomi
Last active November 3, 2018 11:10
Show Gist options
  • Save munkacsitomi/4df69425f8d063f0d0c12bd25e97027c to your computer and use it in GitHub Desktop.
Save munkacsitomi/4df69425f8d063f0d0c12bd25e97027c to your computer and use it in GitHub Desktop.
export const ROUTES: Routes = [
{
path: '',
canActivate: [CoursesGuard],
component: CoursesComponent,
},
{
path: ':id',
canActivate: [CoursesGuard],
component: CourseComponent,
children: [
{ path: '', redirectTo: 'metadata', pathMatch: 'full' },
{ path: 'metadata', component: CourseMetadataComponent },
{ path: 'curriculum', component: CourseCurriculumComponent },
{ path: 'prices', component: CoursePricesComponent },
{ path: 'coupons', component: CourseCouponsComponent },
],
},
];
const routes: Routes = [{
path: 'calendar',
component: CalendarComponent,
children: [
{ path: '', redirectTo: 'new', pathMatch: 'full' },
{ path: 'all', component: CalendarListComponent, data: { title: 'My Calendar' } },
{ path: 'new', component: CalendarEventComponent, data: { title: 'New Calendar Entry' } },
{ path: ':id', component: CalendarEventComponent, data: { title: 'Calendar Entry' } }
]
}];
const ROUTES: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'notes',
children: [
{ path: '', component: NotesComponent },
{ path: ':id', component: NoteComponent }
]
},
{ path: 'customers', loadChildren: 'app/customers/customers.module#CustomersModule' }
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment