]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { NgModule } from '@angular/core' |
57c36b27 | 2 | import { RouterModule, Routes } from '@angular/router' |
066e94c5 | 3 | import { VideoLocalComponent } from '@app/videos/video-list/video-local.component' |
8b13c289 | 4 | import { MetaGuard } from '@ngx-meta/core' |
9bf9d2a5 C |
5 | import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component' |
6 | import { VideoTrendingComponent } from './video-list/video-trending.component' | |
df98563e | 7 | import { VideosComponent } from './videos.component' |
22a16e36 | 8 | import { VideoUserSubscriptionsComponent } from '@app/videos/video-list/video-user-subscriptions.component' |
2d3741d6 | 9 | import { VideoOverviewComponent } from '@app/videos/video-list/video-overview.component' |
0629423c | 10 | |
693b1aba | 11 | const videosRoutes: Routes = [ |
0629423c C |
12 | { |
13 | path: 'videos', | |
14 | component: VideosComponent, | |
8b13c289 | 15 | canActivateChild: [ MetaGuard ], |
0629423c | 16 | children: [ |
2d3741d6 C |
17 | { |
18 | path: 'overview', | |
19 | component: VideoOverviewComponent, | |
20 | data: { | |
21 | meta: { | |
22 | title: 'Videos overview' | |
23 | } | |
24 | } | |
25 | }, | |
0629423c | 26 | { |
9bf9d2a5 C |
27 | path: 'trending', |
28 | component: VideoTrendingComponent, | |
29 | data: { | |
30 | meta: { | |
31 | title: 'Trending videos' | |
32 | } | |
33 | } | |
34 | }, | |
35 | { | |
36 | path: 'recently-added', | |
37 | component: VideoRecentlyAddedComponent, | |
b58c69a1 C |
38 | data: { |
39 | meta: { | |
9bf9d2a5 | 40 | title: 'Recently added videos' |
b58c69a1 C |
41 | } |
42 | } | |
0629423c | 43 | }, |
066e94c5 | 44 | { |
22a16e36 C |
45 | path: 'subscriptions', |
46 | component: VideoUserSubscriptionsComponent, | |
47 | data: { | |
48 | meta: { | |
49 | title: 'Subscriptions' | |
50 | } | |
51 | } | |
52 | }, | |
53 | { | |
066e94c5 C |
54 | path: 'local', |
55 | component: VideoLocalComponent, | |
56 | data: { | |
57 | meta: { | |
58 | title: 'Local videos' | |
59 | } | |
60 | } | |
61 | }, | |
0629423c | 62 | { |
f47bf2e1 | 63 | path: 'upload', |
63c4db6d | 64 | loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule', |
b58c69a1 C |
65 | data: { |
66 | meta: { | |
f47bf2e1 | 67 | title: 'Upload a video' |
b58c69a1 C |
68 | } |
69 | } | |
0629423c | 70 | }, |
d8e689b8 | 71 | { |
c663955b | 72 | path: 'update/:uuid', |
63c4db6d | 73 | loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule', |
d8e689b8 C |
74 | data: { |
75 | meta: { | |
76 | title: 'Edit a video' | |
77 | } | |
78 | } | |
79 | }, | |
91219e66 | 80 | { |
f0a39880 | 81 | path: 'watch', |
63c4db6d | 82 | loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', |
a685e25c C |
83 | data: { |
84 | preload: 3000 | |
85 | } | |
0629423c C |
86 | } |
87 | ] | |
88 | } | |
df98563e | 89 | ] |
693b1aba C |
90 | |
91 | @NgModule({ | |
92 | imports: [ RouterModule.forChild(videosRoutes) ], | |
93 | exports: [ RouterModule ] | |
94 | }) | |
95 | export class VideosRoutingModule {} |