23 lines
600 B
TypeScript
23 lines
600 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { Routes, RouterModule } from '@angular/router';
|
||
|
import { AuthGuard } from './guards/auth.guard';
|
||
|
|
||
|
const routes: Routes = [
|
||
|
{ path: '', redirectTo: '/messenger', pathMatch: 'full' },
|
||
|
{
|
||
|
path: 'messenger',
|
||
|
loadChildren: './pages/messenger/messenger.page.module#MessengerPageModule',
|
||
|
canActivate: [AuthGuard]
|
||
|
},
|
||
|
{
|
||
|
path: 'account',
|
||
|
loadChildren: './pages/account/account.page.module#AccountPageModule'
|
||
|
}
|
||
|
];
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [RouterModule.forRoot(routes)],
|
||
|
exports: [RouterModule]
|
||
|
})
|
||
|
export class AppRoutingModule {}
|