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

27 lines
724 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 { AuthGuard } from './guards/auth.guard';
2019-09-19 05:15:43 +00:00
import { MessengerResolver } from './resolvers/messenger.resolver';
2019-09-18 06:02:21 +00:00
const routes: Routes = [
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
{
path: 'messenger',
loadChildren: './pages/messenger/messenger.page.module#MessengerPageModule',
2019-09-19 05:15:43 +00:00
canActivate: [AuthGuard],
resolve: {
protocol: MessengerResolver
}
2019-09-18 06:02:21 +00:00
},
{
path: 'account',
loadChildren: './pages/account/account.page.module#AccountPageModule'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {}