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