mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
18 lines
474 B
TypeScript
18 lines
474 B
TypeScript
import { inject } from '@angular/core'
|
|
import { Routes } from '@angular/router'
|
|
import { AuthService } from 'src/app/services/auth.service'
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
loadChildren: () => import('./routes/home'),
|
|
canMatch: [() => inject(AuthService).authenticated()],
|
|
},
|
|
{
|
|
path: '',
|
|
loadComponent: () => import('./routes/login'),
|
|
canMatch: [() => !inject(AuthService).authenticated()],
|
|
},
|
|
{ path: '**', redirectTo: '' },
|
|
]
|