next-ucap-messenger/projects/ucap-webmessenger-app/src/app/app-routing.module.ts
2019-09-26 11:11:22 +09:00

28 lines
774 B
TypeScript

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