blob: 070b9b5c5cce96d3356bcfc3de47292e621f7fde (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { MetaGuard } from '@ngx-meta/core'
import { LoginGuard } from '../core'
import { AccountComponent } from './account.component'
import { AccountSettingsComponent } from './account-settings/account-settings.component'
import { AccountVideosComponent } from './account-videos/account-videos.component'
const accountRoutes: Routes = [
{
path: 'account',
component: AccountComponent,
canActivateChild: [ MetaGuard, LoginGuard ],
children: [
{
path: 'settings',
component: AccountSettingsComponent,
data: {
meta: {
title: 'Account settings'
}
}
},
{
path: 'videos',
component: AccountVideosComponent,
data: {
meta: {
title: 'Account videos'
}
}
}
]
}
]
@NgModule({
imports: [ RouterModule.forChild(accountRoutes) ],
exports: [ RouterModule ]
})
export class AccountRoutingModule {}
|