]>
Commit | Line | Data |
---|---|---|
170726f5 C |
1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
67ed6552 C |
4 | import { VideoChannelPlaylistsComponent } from './video-channel-playlists/video-channel-playlists.component' |
5 | import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' | |
6 | import { VideoChannelsComponent } from './video-channels.component' | |
170726f5 C |
7 | |
8 | const videoChannelsRoutes: Routes = [ | |
9 | { | |
2f1548fd | 10 | path: ':videoChannelName', |
170726f5 C |
11 | component: VideoChannelsComponent, |
12 | canActivateChild: [ MetaGuard ], | |
13 | children: [ | |
14 | { | |
15 | path: '', | |
16 | redirectTo: 'videos', | |
17 | pathMatch: 'full' | |
18 | }, | |
19 | { | |
20 | path: 'videos', | |
21 | component: VideoChannelVideosComponent, | |
22 | data: { | |
23 | meta: { | |
f29f487e | 24 | title: $localize`Video channel videos` |
489290b8 C |
25 | }, |
26 | reuse: { | |
27 | enabled: true, | |
28 | key: 'video-channel-videos-list' | |
170726f5 C |
29 | } |
30 | } | |
31 | }, | |
bce47964 C |
32 | { |
33 | path: 'video-playlists', | |
34 | component: VideoChannelPlaylistsComponent, | |
35 | data: { | |
36 | meta: { | |
f29f487e | 37 | title: $localize`Video channel playlists` |
bce47964 C |
38 | } |
39 | } | |
170726f5 C |
40 | } |
41 | ] | |
42 | } | |
43 | ] | |
44 | ||
45 | @NgModule({ | |
46 | imports: [ RouterModule.forChild(videoChannelsRoutes) ], | |
47 | exports: [ RouterModule ] | |
48 | }) | |
49 | export class VideoChannelsRoutingModule {} |