]>
Commit | Line | Data |
---|---|---|
df98563e C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
8b13c289 | 3 | import { MetaGuard } from '@ngx-meta/core' |
f47bf2e1 | 4 | import { LoginGuard } from '../core' |
4bb6886d C |
5 | import { MyAccountComponent } from './my-account.component' |
6 | import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' | |
7 | import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' | |
62e62f11 C |
8 | import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component' |
9 | import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component' | |
10 | import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component' | |
ed31c059 | 11 | import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component' |
22a16e36 | 12 | import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component' |
74d63469 | 13 | import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component' |
693b1aba | 14 | |
4bb6886d | 15 | const myAccountRoutes: Routes = [ |
693b1aba | 16 | { |
62e62f11 | 17 | path: '', |
4bb6886d | 18 | component: MyAccountComponent, |
c30745f3 C |
19 | canActivateChild: [ MetaGuard, LoginGuard ], |
20 | children: [ | |
379acb21 C |
21 | { |
22 | path: '', | |
23 | redirectTo: 'settings', | |
24 | pathMatch: 'full' | |
25 | }, | |
c30745f3 C |
26 | { |
27 | path: 'settings', | |
4bb6886d | 28 | component: MyAccountSettingsComponent, |
c30745f3 C |
29 | data: { |
30 | meta: { | |
31 | title: 'Account settings' | |
32 | } | |
33 | } | |
34 | }, | |
08c1efbe C |
35 | { |
36 | path: 'video-channels', | |
37 | component: MyAccountVideoChannelsComponent, | |
38 | data: { | |
39 | meta: { | |
40 | title: 'Account video channels' | |
41 | } | |
42 | } | |
43 | }, | |
44 | { | |
45 | path: 'video-channels/create', | |
46 | component: MyAccountVideoChannelCreateComponent, | |
47 | data: { | |
48 | meta: { | |
49 | title: 'Create new video channel' | |
50 | } | |
51 | } | |
52 | }, | |
53 | { | |
54 | path: 'video-channels/update/:videoChannelId', | |
55 | component: MyAccountVideoChannelUpdateComponent, | |
56 | data: { | |
57 | meta: { | |
58 | title: 'Update video channel' | |
59 | } | |
60 | } | |
61 | }, | |
202f6b6c C |
62 | { |
63 | path: 'videos', | |
4bb6886d | 64 | component: MyAccountVideosComponent, |
202f6b6c C |
65 | data: { |
66 | meta: { | |
67 | title: 'Account videos' | |
68 | } | |
69 | } | |
ed31c059 C |
70 | }, |
71 | { | |
72 | path: 'video-imports', | |
73 | component: MyAccountVideoImportsComponent, | |
74 | data: { | |
75 | meta: { | |
76 | title: 'Account video imports' | |
77 | } | |
78 | } | |
22a16e36 C |
79 | }, |
80 | { | |
81 | path: 'subscriptions', | |
82 | component: MyAccountSubscriptionsComponent, | |
83 | data: { | |
84 | meta: { | |
85 | title: 'Account subscriptions' | |
86 | } | |
87 | } | |
74d63469 GR |
88 | }, |
89 | { | |
90 | path: 'ownership', | |
91 | component: MyAccountOwnershipComponent, | |
92 | data: { | |
93 | meta: { | |
94 | title: 'Ownership changes' | |
95 | } | |
96 | } | |
202f6b6c | 97 | } |
c30745f3 | 98 | ] |
693b1aba | 99 | } |
df98563e | 100 | ] |
693b1aba C |
101 | |
102 | @NgModule({ | |
4bb6886d | 103 | imports: [ RouterModule.forChild(myAccountRoutes) ], |
693b1aba C |
104 | exports: [ RouterModule ] |
105 | }) | |
4bb6886d | 106 | export class MyAccountRoutingModule {} |