mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 06:27:37 +00:00
21 lines
632 B
TypeScript
21 lines
632 B
TypeScript
import { inject } from '@angular/core';
|
|
import { Routes } from '@angular/router';
|
|
import { Login } from './shared/pages/login/login';
|
|
import { PlatformService } from './shared/services/platform.service';
|
|
import { authGuard } from './shared/guards/auth.guard';
|
|
|
|
export const routes: Routes = [
|
|
{ path: 'login', component: Login },
|
|
{
|
|
path: '',
|
|
canMatch: [() => inject(PlatformService).formFactor() === 'mobile'],
|
|
canActivate: [authGuard],
|
|
loadChildren: () => import('./mobile/mobile.routes'),
|
|
},
|
|
{
|
|
path: '',
|
|
canActivate: [authGuard],
|
|
loadChildren: () => import('./desktop/desktop.routes'),
|
|
},
|
|
];
|