app-routing.module.ts 1.25 KB
Newer Older
Ooh-Ao committed
1 2

import { Routes } from '@angular/router';
Ooh-Ao committed
3 4 5 6 7 8

import { FullComponent } from './layouts/full/full.component';
import { BlankComponent } from './layouts/blank/blank.component';
import { AuthGuard } from './auth.guard';

export const Approutes: Routes = [
Ooh-Ao committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    {
        path: '',
        component: FullComponent,
        // canActivate: [AuthGuard],
        children: [
            { path: '', redirectTo: '/authentication/login', pathMatch: 'full' },
            {
                path: 'starter',
                loadChildren: () => import('./starter/starter.module').then(m => m.StarterModule)
            },
            {
                path: 'component',
                loadChildren: () => import('./component/component.module').then(m => m.ComponentsModule)
            },
            { path: 'apps', loadChildren: () => import('./apps/apps.module').then(m => m.AppsModule) },
Ooh-Ao committed
24

Ooh-Ao committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
        ]
    },
    {
        path: '',
        component: BlankComponent,
        children: [
            {
                path: 'authentication',
                loadChildren:
                    () => import('./authentication/authentication.module').then(m => m.AuthenticationModule)
            }
        ]
    },
    {
        path: '**',
        redirectTo: '/authentication/404'
    }
];