From a685e25ca05f08ad1b3f7fbaccc8744727bd8d27 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 9 Oct 2017 14:28:44 +0200 Subject: Try to optimize frontend --- client/src/app/videos/videos-routing.module.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'client/src/app/videos/videos-routing.module.ts') diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts index 715671ba7..225b6b018 100644 --- a/client/src/app/videos/videos-routing.module.ts +++ b/client/src/app/videos/videos-routing.module.ts @@ -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 + } } ] } -- cgit v1.2.3