24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
|
|
import { Routes } from '@angular/router';
|
||
|
|
import { AppIdGuard } from './guards/appid.guard';
|
||
|
|
import { AuthGuard } from './guards/auth.guard';
|
||
|
|
import { HomeComponent } from './home/home.component';
|
||
|
|
import { LoginComponent } from './login/login.component';
|
||
|
|
import { NotFoundComponent } from './shared/components/not-found/not-found.component';
|
||
|
|
import { UserSettingsComponent } from './user-settings/user-settings.component';
|
||
|
|
|
||
|
|
export const routes: Routes = [
|
||
|
|
{ path: 'login', component: LoginComponent },
|
||
|
|
{ path: '404', component: NotFoundComponent },
|
||
|
|
{
|
||
|
|
path: ':appId',
|
||
|
|
children: [
|
||
|
|
{ path: 'home', component: HomeComponent },
|
||
|
|
{ path: 'usersettings', component: UserSettingsComponent },
|
||
|
|
{ path: 'add-carnet', loadComponent: () => import('./carnet/add/add-carnet.component').then(m => m.AddCarnetComponent) },
|
||
|
|
{ path: '', redirectTo: 'home', pathMatch: 'full' }
|
||
|
|
],
|
||
|
|
canActivate: [AuthGuard, AppIdGuard]
|
||
|
|
},
|
||
|
|
{ path: '', redirectTo: 'login', pathMatch: 'full' },
|
||
|
|
{ path: '**', redirectTo: '/404' }
|
||
|
|
];
|