33 lines
818 B
TypeScript
33 lines
818 B
TypeScript
import { Routes } from '@angular/router';
|
|
import {authGuard} from "./service/auth.guard";
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: 'auth',
|
|
children: [
|
|
{
|
|
path: 'register',
|
|
loadComponent: () => import('./component/auth/register/register.component'),
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadComponent: () => import('./component/auth/login/login.component'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '',
|
|
loadComponent: () => import('./component/random-ahh/random-ahh.component'),
|
|
children: [
|
|
{
|
|
path: 'dashboard',
|
|
loadComponent: () => import('./component/dashboard/dashboard.component'),
|
|
},
|
|
{
|
|
path: 'users',
|
|
loadComponent: () => import('./component/users/users.component'),
|
|
},
|
|
],
|
|
canActivate: [authGuard],
|
|
}
|
|
];
|