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