]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-account/my-account-routing.module.ts
Load my-account module lazily
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-routing.module.ts
CommitLineData
df98563e
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
8b13c289 3import { MetaGuard } from '@ngx-meta/core'
f47bf2e1 4import { LoginGuard } from '../core'
4bb6886d
C
5import { MyAccountComponent } from './my-account.component'
6import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
7import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
62e62f11
C
8import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
9import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
10import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
693b1aba 11
4bb6886d 12const myAccountRoutes: Routes = [
693b1aba 13 {
62e62f11 14 path: '',
4bb6886d 15 component: MyAccountComponent,
c30745f3
C
16 canActivateChild: [ MetaGuard, LoginGuard ],
17 children: [
18 {
19 path: 'settings',
4bb6886d 20 component: MyAccountSettingsComponent,
c30745f3
C
21 data: {
22 meta: {
23 title: 'Account settings'
24 }
25 }
26 },
08c1efbe
C
27 {
28 path: 'video-channels',
29 component: MyAccountVideoChannelsComponent,
30 data: {
31 meta: {
32 title: 'Account video channels'
33 }
34 }
35 },
36 {
37 path: 'video-channels/create',
38 component: MyAccountVideoChannelCreateComponent,
39 data: {
40 meta: {
41 title: 'Create new video channel'
42 }
43 }
44 },
45 {
46 path: 'video-channels/update/:videoChannelId',
47 component: MyAccountVideoChannelUpdateComponent,
48 data: {
49 meta: {
50 title: 'Update video channel'
51 }
52 }
53 },
202f6b6c
C
54 {
55 path: 'videos',
4bb6886d 56 component: MyAccountVideosComponent,
202f6b6c
C
57 data: {
58 meta: {
59 title: 'Account videos'
60 }
61 }
62 }
c30745f3 63 ]
693b1aba 64 }
df98563e 65]
693b1aba
C
66
67@NgModule({
4bb6886d 68 imports: [ RouterModule.forChild(myAccountRoutes) ],
693b1aba
C
69 exports: [ RouterModule ]
70})
4bb6886d 71export class MyAccountRoutingModule {}