diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:49:20 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 1942f11d5ee6926ad93dc1b79fae18325ba5de18 (patch) | |
tree | 3f2a3cd9466a56c419d197ac832a3e9cbc86bec4 /client/src/app/videos/videos-routing.module.ts | |
parent | 67ed6552b831df66713bac9e672738796128d33f (diff) | |
download | PeerTube-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.ts | 125 |
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 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { VideoLocalComponent } from '@app/videos/video-list/video-local.component' | ||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component' | ||
6 | import { VideoTrendingComponent } from './video-list/video-trending.component' | ||
7 | import { VideoMostLikedComponent } from './video-list/video-most-liked.component' | ||
8 | import { VideosComponent } from './videos.component' | ||
9 | import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component' | ||
10 | import { VideoOverviewComponent } from './video-list/overview/video-overview.component' | ||
11 | |||
12 | const 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 | }) | ||
125 | export class VideosRoutingModule {} | ||