]>
Commit | Line | Data |
---|---|---|
0626e7af C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
170726f5 | 4 | import { AccountsComponent } from './accounts.component' |
0626e7af | 5 | import { AccountVideosComponent } from './account-videos/account-videos.component' |
d3e91a5f C |
6 | import { AccountAboutComponent } from './account-about/account-about.component' |
7 | import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component' | |
0626e7af | 8 | |
170726f5 | 9 | const accountsRoutes: Routes = [ |
1a03bea0 C |
10 | { |
11 | path: 'peertube', | |
12 | redirectTo: '/videos/local' | |
13 | }, | |
0626e7af C |
14 | { |
15 | path: ':accountId', | |
170726f5 | 16 | component: AccountsComponent, |
0626e7af C |
17 | canActivateChild: [ MetaGuard ], |
18 | children: [ | |
19 | { | |
20 | path: '', | |
c8487f3f | 21 | redirectTo: 'video-channels', |
0626e7af C |
22 | pathMatch: 'full' |
23 | }, | |
24 | { | |
25 | path: 'videos', | |
26 | component: AccountVideosComponent, | |
27 | data: { | |
28 | meta: { | |
29 | title: 'Account videos' | |
489290b8 C |
30 | }, |
31 | reuse: { | |
32 | enabled: true, | |
33 | key: 'account-videos-list' | |
0626e7af C |
34 | } |
35 | } | |
36 | }, | |
d3e91a5f C |
37 | { |
38 | path: 'video-channels', | |
39 | component: AccountVideoChannelsComponent, | |
40 | data: { | |
41 | meta: { | |
42 | title: 'Account video channels' | |
43 | } | |
44 | } | |
45 | }, | |
0626e7af C |
46 | { |
47 | path: 'about', | |
48 | component: AccountAboutComponent, | |
49 | data: { | |
50 | meta: { | |
51 | title: 'About account' | |
52 | } | |
53 | } | |
54 | } | |
55 | ] | |
56 | } | |
57 | ] | |
58 | ||
59 | @NgModule({ | |
170726f5 | 60 | imports: [ RouterModule.forChild(accountsRoutes) ], |
0626e7af C |
61 | exports: [ RouterModule ] |
62 | }) | |
170726f5 | 63 | export class AccountsRoutingModule {} |