next-ucap-messenger/projects/ucap-webmessenger-app/src/app/app-routing.module.ts

28 lines
755 B
TypeScript
Raw Normal View History

2019-09-18 06:02:21 +00:00
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AppAuthGuard } from './guards/auth.guard';
2019-09-18 06:02:21 +00:00
const routes: Routes = [
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
{
path: 'messenger',
loadChildren:
'./pages/messenger/messenger.page.module#AppMessengerPageModule',
2019-10-02 05:34:17 +00:00
canActivate: [AppAuthGuard]
2019-09-18 06:02:21 +00:00
},
{
path: 'account',
loadChildren: './pages/account/account.page.module#AppAccountPageModule'
2019-10-02 08:12:51 +00:00
},
{
path: 'template',
loadChildren: './pages/template/template.page.module#AppTemplatePageModule'
2019-09-18 06:02:21 +00:00
}
];
@NgModule({
2019-09-26 02:11:22 +00:00
imports: [RouterModule.forRoot(routes, { enableTracing: false })],
2019-09-18 06:02:21 +00:00
exports: [RouterModule]
})
export class AppRoutingModule {}