2019-09-18 06:02:21 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
2019-09-23 05:23:24 +00:00
|
|
|
import { AppAuthGuard } from './guards/auth.guard';
|
|
|
|
import { AppMessengerResolver } from './resolvers/messenger.resolver';
|
2019-09-18 06:02:21 +00:00
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
|
|
|
|
{
|
|
|
|
path: 'messenger',
|
2019-09-23 05:23:24 +00:00
|
|
|
loadChildren:
|
|
|
|
'./pages/messenger/messenger.page.module#AppMessengerPageModule',
|
|
|
|
canActivate: [AppAuthGuard],
|
2019-09-19 05:15:43 +00:00
|
|
|
resolve: {
|
2019-09-23 05:23:24 +00:00
|
|
|
protocol: AppMessengerResolver
|
2019-09-19 05:15:43 +00:00
|
|
|
}
|
2019-09-18 06:02:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'account',
|
2019-09-23 05:23:24 +00:00
|
|
|
loadChildren: './pages/account/account.page.module#AppAccountPageModule'
|
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 {}
|