]>
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' |
693b1aba | 13 | |
4bb6886d | 14 | const myAccountRoutes: Routes = [ |
693b1aba | 15 | { |
62e62f11 | 16 | path: '', |
4bb6886d | 17 | component: MyAccountComponent, |
c30745f3 C |
18 | canActivateChild: [ MetaGuard, LoginGuard ], |
19 | children: [ | |
379acb21 C |
20 | { |
21 | path: '', | |
22 | redirectTo: 'settings', | |
23 | pathMatch: 'full' | |
24 | }, | |
c30745f3 C |
25 | { |
26 | path: 'settings', | |
4bb6886d | 27 | component: MyAccountSettingsComponent, |
c30745f3 C |
28 | data: { |
29 | meta: { | |
30 | title: 'Account settings' | |
31 | } | |
32 | } | |
33 | }, | |
08c1efbe C |
34 | { |
35 | path: 'video-channels', | |
36 | component: MyAccountVideoChannelsComponent, | |
37 | data: { | |
38 | meta: { | |
39 | title: 'Account video channels' | |
40 | } | |
41 | } | |
42 | }, | |
43 | { | |
44 | path: 'video-channels/create', | |
45 | component: MyAccountVideoChannelCreateComponent, | |
46 | data: { | |
47 | meta: { | |
48 | title: 'Create new video channel' | |
49 | } | |
50 | } | |
51 | }, | |
52 | { | |
53 | path: 'video-channels/update/:videoChannelId', | |
54 | component: MyAccountVideoChannelUpdateComponent, | |
55 | data: { | |
56 | meta: { | |
57 | title: 'Update video channel' | |
58 | } | |
59 | } | |
60 | }, | |
202f6b6c C |
61 | { |
62 | path: 'videos', | |
4bb6886d | 63 | component: MyAccountVideosComponent, |
202f6b6c C |
64 | data: { |
65 | meta: { | |
66 | title: 'Account videos' | |
67 | } | |
68 | } | |
ed31c059 C |
69 | }, |
70 | { | |
71 | path: 'video-imports', | |
72 | component: MyAccountVideoImportsComponent, | |
73 | data: { | |
74 | meta: { | |
75 | title: 'Account video imports' | |
76 | } | |
77 | } | |
22a16e36 C |
78 | }, |
79 | { | |
80 | path: 'subscriptions', | |
81 | component: MyAccountSubscriptionsComponent, | |
82 | data: { | |
83 | meta: { | |
84 | title: 'Account subscriptions' | |
85 | } | |
86 | } | |
202f6b6c | 87 | } |
c30745f3 | 88 | ] |
693b1aba | 89 | } |
df98563e | 90 | ] |
693b1aba C |
91 | |
92 | @NgModule({ | |
4bb6886d | 93 | imports: [ RouterModule.forChild(myAccountRoutes) ], |
693b1aba C |
94 | exports: [ RouterModule ] |
95 | }) | |
4bb6886d | 96 | export class MyAccountRoutingModule {} |