]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/videos-routing.module.ts
Try to optimize frontend
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / videos-routing.module.ts
index 715671ba734be670dc402dd5956e9f49672f9849..225b6b018abc02bfb50dbf627b2d9f7069846cfe 100644 (file)
@@ -3,10 +3,8 @@ import { RouterModule, Routes } from '@angular/router'
 
 import { MetaGuard } from '@ngx-meta/core'
 
-import { VideoAddComponent, VideoUpdateComponent } from './video-edit'
 import { VideoListComponent } from './video-list'
 import { VideosComponent } from './videos.component'
-import { VideoWatchComponent } from './video-watch'
 
 const videosRoutes: Routes = [
   {
@@ -25,7 +23,7 @@ const videosRoutes: Routes = [
       },
       {
         path: 'add',
-        component: VideoAddComponent,
+        loadChildren: 'app/videos/+video-edit#VideoAddModule',
         data: {
           meta: {
             title: 'Add a video'
@@ -34,7 +32,7 @@ const videosRoutes: Routes = [
       },
       {
         path: 'edit/:uuid',
-        component: VideoUpdateComponent,
+        loadChildren: 'app/videos/+video-edit#VideoUpdateModule',
         data: {
           meta: {
             title: 'Edit a video'
@@ -47,7 +45,10 @@ const videosRoutes: Routes = [
       },
       {
         path: 'watch/:uuid',
-        component: VideoWatchComponent
+        loadChildren: 'app/videos/+video-watch#VideoWatchModule',
+        data: {
+          preload: 3000
+        }
       }
     ]
   }