]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/videos-routing.module.ts
Add channels to upload form
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3
4 import { MetaGuard } from '@ngx-meta/core'
5
6 import { VideoListComponent } from './video-list'
7 import { VideosComponent } from './videos.component'
8
9 const videosRoutes: Routes = [
10 {
11 path: 'videos',
12 component: VideosComponent,
13 canActivateChild: [ MetaGuard ],
14 children: [
15 {
16 path: 'list',
17 component: VideoListComponent,
18 data: {
19 meta: {
20 title: 'Videos list'
21 }
22 }
23 },
24 {
25 path: 'upload',
26 loadChildren: 'app/videos/+video-edit#VideoAddModule',
27 data: {
28 meta: {
29 title: 'Upload a video'
30 }
31 }
32 },
33 {
34 path: 'edit/:uuid',
35 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
36 data: {
37 meta: {
38 title: 'Edit a video'
39 }
40 }
41 },
42 {
43 path: ':uuid',
44 redirectTo: 'watch/:uuid'
45 },
46 {
47 path: 'watch/:uuid',
48 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
49 data: {
50 preload: 3000
51 }
52 }
53 ]
54 }
55 ]
56
57 @NgModule({
58 imports: [ RouterModule.forChild(videosRoutes) ],
59 exports: [ RouterModule ]
60 })
61 export class VideosRoutingModule {}