member_webapp/src/app/app-routing.module.ts

17 lines
714 B
TypeScript
Raw Normal View History

2018-04-06 08:11:24 +00:00
import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
import { AuthGuard } from './commons/guard/auth.guard';
2018-04-06 06:59:49 +00:00
2018-04-06 08:11:24 +00:00
const routes: Routes = [
2018-04-12 03:22:38 +00:00
{ path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] },
// { path: '', loadChildren: './pages/pages.module#PagesModule'},
2018-04-06 06:59:49 +00:00
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
2018-04-06 08:11:24 +00:00
// { path: 'errors', loadChildren: './pages/errors/errors-page.module#ErrorsPageModule' },
2018-04-06 06:59:49 +00:00
];
2018-04-06 08:11:24 +00:00
@NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true, preloadingStrategy: PreloadAllModules})],
exports: [RouterModule],
})
export class AppRoutingModule { }