]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+video-channels/video-channels-routing.module.ts
More robust tests
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-channels / video-channels-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
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'
7
8 const videoChannelsRoutes: Routes = [
9 {
10 path: ':videoChannelName',
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: {
24 title: $localize`Video channel videos`
25 },
26 reuse: {
27 enabled: true,
28 key: 'video-channel-videos-list'
29 }
30 }
31 },
32 {
33 path: 'video-playlists',
34 component: VideoChannelPlaylistsComponent,
35 data: {
36 meta: {
37 title: $localize`Video channel playlists`
38 }
39 }
40 }
41 ]
42 }
43 ]
44
45 @NgModule({
46 imports: [ RouterModule.forChild(videoChannelsRoutes) ],
47 exports: [ RouterModule ]
48 })
49 export class VideoChannelsRoutingModule {}