]>
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' | |
4 | import { VideoChannelsComponent } from './video-channels.component' | |
5 | import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' | |
6 | import { VideoChannelAboutComponent } from './video-channel-about/video-channel-about.component' | |
bce47964 | 7 | import { VideoChannelPlaylistsComponent } from '@app/+video-channels/video-channel-playlists/video-channel-playlists.component' |
170726f5 C |
8 | |
9 | const videoChannelsRoutes: Routes = [ | |
10 | { | |
2f1548fd | 11 | path: ':videoChannelName', |
170726f5 C |
12 | component: VideoChannelsComponent, |
13 | canActivateChild: [ MetaGuard ], | |
14 | children: [ | |
15 | { | |
16 | path: '', | |
17 | redirectTo: 'videos', | |
18 | pathMatch: 'full' | |
19 | }, | |
20 | { | |
21 | path: 'videos', | |
22 | component: VideoChannelVideosComponent, | |
23 | data: { | |
24 | meta: { | |
25 | title: 'Video channel videos' | |
489290b8 C |
26 | }, |
27 | reuse: { | |
28 | enabled: true, | |
29 | key: 'video-channel-videos-list' | |
170726f5 C |
30 | } |
31 | } | |
32 | }, | |
bce47964 C |
33 | { |
34 | path: 'video-playlists', | |
35 | component: VideoChannelPlaylistsComponent, | |
36 | data: { | |
37 | meta: { | |
38 | title: 'Video channel playlists' | |
39 | } | |
40 | } | |
41 | }, | |
170726f5 C |
42 | { |
43 | path: 'about', | |
44 | component: VideoChannelAboutComponent, | |
45 | data: { | |
46 | meta: { | |
47 | title: 'About video channel' | |
48 | } | |
49 | } | |
50 | } | |
51 | ] | |
52 | } | |
53 | ] | |
54 | ||
55 | @NgModule({ | |
56 | imports: [ RouterModule.forChild(videoChannelsRoutes) ], | |
57 | exports: [ RouterModule ] | |
58 | }) | |
59 | export class VideoChannelsRoutingModule {} |