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