]>
Commit | Line | Data |
---|---|---|
1 | import { NgModule } from '@angular/core' | |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
4 | import { LoginGuard } from '../core' | |
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' | |
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' | |
11 | import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component' | |
12 | import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component' | |
13 | import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component' | |
14 | ||
15 | const myAccountRoutes: Routes = [ | |
16 | { | |
17 | path: '', | |
18 | component: MyAccountComponent, | |
19 | canActivateChild: [ MetaGuard, LoginGuard ], | |
20 | children: [ | |
21 | { | |
22 | path: '', | |
23 | redirectTo: 'settings', | |
24 | pathMatch: 'full' | |
25 | }, | |
26 | { | |
27 | path: 'settings', | |
28 | component: MyAccountSettingsComponent, | |
29 | data: { | |
30 | meta: { | |
31 | title: 'Account settings' | |
32 | } | |
33 | } | |
34 | }, | |
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 | }, | |
62 | { | |
63 | path: 'videos', | |
64 | component: MyAccountVideosComponent, | |
65 | data: { | |
66 | meta: { | |
67 | title: 'Account videos' | |
68 | } | |
69 | } | |
70 | }, | |
71 | { | |
72 | path: 'video-imports', | |
73 | component: MyAccountVideoImportsComponent, | |
74 | data: { | |
75 | meta: { | |
76 | title: 'Account video imports' | |
77 | } | |
78 | } | |
79 | }, | |
80 | { | |
81 | path: 'subscriptions', | |
82 | component: MyAccountSubscriptionsComponent, | |
83 | data: { | |
84 | meta: { | |
85 | title: 'Account subscriptions' | |
86 | } | |
87 | } | |
88 | }, | |
89 | { | |
90 | path: 'ownership', | |
91 | component: MyAccountOwnershipComponent, | |
92 | data: { | |
93 | meta: { | |
94 | title: 'Ownership changes' | |
95 | } | |
96 | } | |
97 | } | |
98 | ] | |
99 | } | |
100 | ] | |
101 | ||
102 | @NgModule({ | |
103 | imports: [ RouterModule.forChild(myAccountRoutes) ], | |
104 | exports: [ RouterModule ] | |
105 | }) | |
106 | export class MyAccountRoutingModule {} |