aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/videos-routing.module.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-23 14:49:20 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-06-23 16:00:49 +0200
commit1942f11d5ee6926ad93dc1b79fae18325ba5de18 (patch)
tree3f2a3cd9466a56c419d197ac832a3e9cbc86bec4 /client/src/app/videos/videos-routing.module.ts
parent67ed6552b831df66713bac9e672738796128d33f (diff)
downloadPeerTube-1942f11d5ee6926ad93dc1b79fae18325ba5de18.tar.gz
PeerTube-1942f11d5ee6926ad93dc1b79fae18325ba5de18.tar.zst
PeerTube-1942f11d5ee6926ad93dc1b79fae18325ba5de18.zip
Lazy load all routes
Diffstat (limited to 'client/src/app/videos/videos-routing.module.ts')
-rw-r--r--client/src/app/videos/videos-routing.module.ts125
1 files changed, 0 insertions, 125 deletions
diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts
deleted file mode 100644
index 16b65be63..000000000
--- a/client/src/app/videos/videos-routing.module.ts
+++ /dev/null
@@ -1,125 +0,0 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3import { VideoLocalComponent } from '@app/videos/video-list/video-local.component'
4import { MetaGuard } from '@ngx-meta/core'
5import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
6import { VideoTrendingComponent } from './video-list/video-trending.component'
7import { VideoMostLikedComponent } from './video-list/video-most-liked.component'
8import { VideosComponent } from './videos.component'
9import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
10import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
11
12const videosRoutes: Routes = [
13 {
14 path: 'videos',
15 component: VideosComponent,
16 canActivateChild: [ MetaGuard ],
17 children: [
18 {
19 path: 'overview',
20 component: VideoOverviewComponent,
21 data: {
22 meta: {
23 title: 'Discover videos'
24 }
25 }
26 },
27 {
28 path: 'trending',
29 component: VideoTrendingComponent,
30 data: {
31 meta: {
32 title: 'Trending videos'
33 },
34 reuse: {
35 enabled: true,
36 key: 'trending-videos-list'
37 }
38 }
39 },
40 {
41 path: 'most-liked',
42 component: VideoMostLikedComponent,
43 data: {
44 meta: {
45 title: 'Most liked videos'
46 },
47 reuse: {
48 enabled: true,
49 key: 'most-liked-videos-list'
50 }
51 }
52 },
53 {
54 path: 'recently-added',
55 component: VideoRecentlyAddedComponent,
56 data: {
57 meta: {
58 title: 'Recently added videos'
59 },
60 reuse: {
61 enabled: true,
62 key: 'recently-added-videos-list'
63 }
64 }
65 },
66 {
67 path: 'subscriptions',
68 component: VideoUserSubscriptionsComponent,
69 data: {
70 meta: {
71 title: 'Subscriptions'
72 },
73 reuse: {
74 enabled: true,
75 key: 'subscription-videos-list'
76 }
77 }
78 },
79 {
80 path: 'local',
81 component: VideoLocalComponent,
82 data: {
83 meta: {
84 title: 'Local videos'
85 },
86 reuse: {
87 enabled: true,
88 key: 'local-videos-list'
89 }
90 }
91 },
92 {
93 path: 'upload',
94 loadChildren: () => import('@app/videos/+video-edit/video-add.module').then(m => m.VideoAddModule),
95 data: {
96 meta: {
97 title: 'Upload a video'
98 }
99 }
100 },
101 {
102 path: 'update/:uuid',
103 loadChildren: () => import('@app/videos/+video-edit/video-update.module').then(m => m.VideoUpdateModule),
104 data: {
105 meta: {
106 title: 'Edit a video'
107 }
108 }
109 },
110 {
111 path: 'watch',
112 loadChildren: () => import('@app/videos/+video-watch/video-watch.module').then(m => m.VideoWatchModule),
113 data: {
114 preload: 3000
115 }
116 }
117 ]
118 }
119]
120
121@NgModule({
122 imports: [ RouterModule.forChild(videosRoutes) ],
123 exports: [ RouterModule ]
124})
125export class VideosRoutingModule {}