Untitled

mail@pastecode.io avatar
unknown
typescript
a year ago
655 B
3
Indexable
Never
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' }
    ] 
  },
];