37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import {authGuard} from "./core/auth/auth.guard";
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
pathMatch: 'full',
|
|
redirectTo: '/main/menu',
|
|
},
|
|
{
|
|
path: 'main',
|
|
canActivate: [authGuard],
|
|
loadComponent: () => import('./pages/main/main.component').then(x => x.Main),
|
|
children: [
|
|
{
|
|
path: 'messages/:discussionId',
|
|
loadComponent: () => import('./pages/messages/messages-main/messages-main.component').then(x => x.MessagesMain)
|
|
},
|
|
{
|
|
path: 'menu',
|
|
loadComponent: () => import('./pages/menu/menu/menu.component').then(x => x.Menu)
|
|
},
|
|
{
|
|
path: 'parameters',
|
|
loadComponent: () => import('./pages/parameters/parameters-main/parameters-main.component').then(x => x.ParametersMain)
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadComponent: () => import('./pages/login-form/login-form.component').then(x => x.LoginFormComponent)
|
|
},
|
|
{
|
|
path: 'register',
|
|
loadComponent: () => import('./pages/register-form/register-form.component').then(x => x.RegisterFormComponent)
|
|
},
|
|
]; |