]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/videos-routing.module.ts
Fix margin issue when seeking video
[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, MyVideosComponent } 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: 'mine',
17 component: MyVideosComponent,
18 data: {
19 meta: {
20 title: 'My videos'
21 }
22 }
23 },
24 {
25 path: 'list',
26 component: VideoListComponent,
27 data: {
28 meta: {
29 title: 'Videos list'
30 }
31 }
32 },
33 {
34 path: 'upload',
35 loadChildren: 'app/videos/+video-edit#VideoAddModule',
36 data: {
37 meta: {
38 title: 'Upload a video'
39 }
40 }
41 },
42 {
43 path: 'edit/:uuid',
44 loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
45 data: {
46 meta: {
47 title: 'Edit a video'
48 }
49 }
50 },
51 {
52 path: ':uuid',
53 redirectTo: 'watch/:uuid'
54 },
55 {
56 path: 'watch/:uuid',
57 loadChildren: 'app/videos/+video-watch#VideoWatchModule',
58 data: {
59 preload: 3000
60 }
61 }
62 ]
63 }
64 ]
65
66 @NgModule({
67 imports: [ RouterModule.forChild(videosRoutes) ],
68 exports: [ RouterModule ]
69 })
70 export class VideosRoutingModule {}