Untitled

 avatar
unknown
typescript
2 years ago
655 B
4
Indexable
const routes: Routes = [
  {
    path: '',
    component: MainLayoutComponent,
    canActivate: [AuthGuard],
    children: [
      { path: 'week-view', component: WeekViewComponent },
      { path: 'my-journals', component: MyJournalsComponent },
      { path: 'templates', component: TemplatesComponent },
      { path: 'trash', component: TrashComponent },
      { path: 'settings', component: SettingsComponent },
      { path: '**', redirectTo: 'week-view' }
    ]
  },
  { 
    path: '', 
    component: LoginLayoutComponent,
    children: [
      { path: 'login', component: LoginComponent },
      { path: '**', redirectTo: 'login' }
    ] 
  },
];