]>
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' | |
489290b8 C |
32 | }, |
33 | reuse: { | |
34 | enabled: true, | |
35 | key: 'trending-videos-list' | |
9bf9d2a5 C |
36 | } |
37 | } | |
38 | }, | |
39 | { | |
40 | path: 'recently-added', | |
41 | component: VideoRecentlyAddedComponent, | |
b58c69a1 C |
42 | data: { |
43 | meta: { | |
9bf9d2a5 | 44 | title: 'Recently added videos' |
489290b8 C |
45 | }, |
46 | reuse: { | |
47 | enabled: true, | |
48 | key: 'recently-added-videos-list' | |
b58c69a1 C |
49 | } |
50 | } | |
0629423c | 51 | }, |
066e94c5 | 52 | { |
22a16e36 C |
53 | path: 'subscriptions', |
54 | component: VideoUserSubscriptionsComponent, | |
55 | data: { | |
56 | meta: { | |
57 | title: 'Subscriptions' | |
489290b8 C |
58 | }, |
59 | reuse: { | |
60 | enabled: true, | |
61 | key: 'subscription-videos-list' | |
22a16e36 C |
62 | } |
63 | } | |
64 | }, | |
65 | { | |
066e94c5 C |
66 | path: 'local', |
67 | component: VideoLocalComponent, | |
68 | data: { | |
69 | meta: { | |
70 | title: 'Local videos' | |
489290b8 C |
71 | }, |
72 | reuse: { | |
73 | enabled: true, | |
74 | key: 'local-videos-list' | |
066e94c5 C |
75 | } |
76 | } | |
77 | }, | |
0629423c | 78 | { |
f47bf2e1 | 79 | path: 'upload', |
63c4db6d | 80 | loadChildren: 'app/videos/+video-edit/video-add.module#VideoAddModule', |
b58c69a1 C |
81 | data: { |
82 | meta: { | |
f47bf2e1 | 83 | title: 'Upload a video' |
b58c69a1 C |
84 | } |
85 | } | |
0629423c | 86 | }, |
d8e689b8 | 87 | { |
c663955b | 88 | path: 'update/:uuid', |
63c4db6d | 89 | loadChildren: 'app/videos/+video-edit/video-update.module#VideoUpdateModule', |
d8e689b8 C |
90 | data: { |
91 | meta: { | |
92 | title: 'Edit a video' | |
93 | } | |
94 | } | |
95 | }, | |
91219e66 | 96 | { |
f0a39880 | 97 | path: 'watch', |
63c4db6d | 98 | loadChildren: 'app/videos/+video-watch/video-watch.module#VideoWatchModule', |
a685e25c C |
99 | data: { |
100 | preload: 3000 | |
101 | } | |
0629423c C |
102 | } |
103 | ] | |
104 | } | |
df98563e | 105 | ] |
693b1aba C |
106 | |
107 | @NgModule({ | |
108 | imports: [ RouterModule.forChild(videosRoutes) ], | |
109 | exports: [ RouterModule ] | |
110 | }) | |
111 | export class VideosRoutingModule {} |