next-ucap-messenger/projects/ucap-webmessenger-app/src/app/app-routing.module.ts
richard-loafle ebddfb20c5 bug fixed
2020-02-07 13:33:30 +09:00

36 lines
896 B
TypeScript

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AppAuthGuard } from './guards/auth.guard';
const routes: Routes = [
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
{
path: 'messenger',
loadChildren: () =>
import('./pages/messenger/messenger.page.module').then(
m => m.AppMessengerPageModule
),
canActivate: [AppAuthGuard]
},
{
path: 'account',
loadChildren: () =>
import('./pages/account/account.page.module').then(
m => m.AppAccountPageModule
)
},
{
path: 'template',
loadChildren: () =>
import('./pages/template/template.page.module').then(
m => m.AppTemplatePageModule
)
}
];
@NgModule({
imports: [RouterModule.forRoot(routes, { enableTracing: false })],
exports: [RouterModule]
})
export class AppRoutingModule {}