18 lines
757 B
TypeScript
18 lines
757 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
|
|
import { AuthGuard } from './commons/guard/auth.guard';
|
|
|
|
const routes: Routes = [
|
|
// { path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] },
|
|
{ path: '', loadChildren: './pages/pages.module#PagesModule' },
|
|
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
|
|
{ path: 'errors', loadChildren: './pages/errors/errors-page.module#ErrorsPageModule' },
|
|
// { path: '**', redirectTo: 'errors/404' }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, {useHash: true, preloadingStrategy: PreloadAllModules})],
|
|
exports: [RouterModule],
|
|
})
|
|
export class AppRoutingModule { }
|