aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app-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/app-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/app-routing.module.ts')
-rw-r--r--client/src/app/app-routing.module.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts
index ceda41415..a39be17dc 100644
--- a/client/src/app/app-routing.module.ts
+++ b/client/src/app/app-routing.module.ts
@@ -4,6 +4,7 @@ import { AppComponent } from '@app/app.component'
4import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' 4import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
5import { MenuGuards } from '@app/core/routing/menu-guard.service' 5import { MenuGuards } from '@app/core/routing/menu-guard.service'
6import { PreloadSelectedModulesList } from './core' 6import { PreloadSelectedModulesList } from './core'
7import { EmptyComponent } from './empty.component'
7 8
8const routes: Routes = [ 9const routes: Routes = [
9 { 10 {
@@ -37,8 +38,24 @@ const routes: Routes = [
37 loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule) 38 loadChildren: () => import('./+signup/+register/register.module').then(m => m.RegisterModule)
38 }, 39 },
39 { 40 {
41 path: 'reset-password',
42 loadChildren: () => import('./+reset-password/reset-password.module').then(m => m.ResetPasswordModule)
43 },
44 {
45 path: 'login',
46 loadChildren: () => import('./+login/login.module').then(m => m.LoginModule)
47 },
48 {
49 path: 'search',
50 loadChildren: () => import('./+search/search.module').then(m => m.SearchModule)
51 },
52 {
53 path: 'videos',
54 loadChildren: () => import('./+videos/videos.module').then(m => m.VideosModule)
55 },
56 {
40 path: '', 57 path: '',
41 component: AppComponent // Avoid 404, app component will redirect dynamically 58 component: EmptyComponent // Avoid 404, app component will redirect dynamically
42 }, 59 },
43 { 60 {
44 path: '**', 61 path: '**',