diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 14:28:44 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-09 14:28:44 +0200 |
commit | a685e25ca05f08ad1b3f7fbaccc8744727bd8d27 (patch) | |
tree | e50fbc2f260a0017113c4668c3c0f3d2fd76ab87 /client/src/app | |
parent | 2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713 (diff) | |
download | PeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.tar.gz PeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.tar.zst PeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.zip |
Try to optimize frontend
Diffstat (limited to 'client/src/app')
33 files changed, 198 insertions, 47 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 191ae6974..0f9484344 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -1,5 +1,7 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { Routes, RouterModule, PreloadAllModules } from '@angular/router' | 2 | import { Routes, RouterModule } from '@angular/router' |
3 | |||
4 | import { PreloadSelectedModulesList } from './core' | ||
3 | 5 | ||
4 | const routes: Routes = [ | 6 | const routes: Routes = [ |
5 | { | 7 | { |
@@ -17,9 +19,10 @@ const routes: Routes = [ | |||
17 | imports: [ | 19 | imports: [ |
18 | RouterModule.forRoot(routes, { | 20 | RouterModule.forRoot(routes, { |
19 | useHash: Boolean(history.pushState) === false, | 21 | useHash: Boolean(history.pushState) === false, |
20 | preloadingStrategy: PreloadAllModules | 22 | preloadingStrategy: PreloadSelectedModulesList |
21 | }) | 23 | }) |
22 | ], | 24 | ], |
25 | providers: [ PreloadSelectedModulesList ], | ||
23 | exports: [ RouterModule ] | 26 | exports: [ RouterModule ] |
24 | }) | 27 | }) |
25 | export class AppRoutingModule {} | 28 | export class AppRoutingModule {} |
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index ae86bc96f..82e647c98 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -2,7 +2,6 @@ import { Component, OnInit, ViewContainerRef } from '@angular/core' | |||
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | 3 | ||
4 | import { AuthService, ConfigService } from './core' | 4 | import { AuthService, ConfigService } from './core' |
5 | import { VideoService } from './videos' | ||
6 | import { UserService } from './shared' | 5 | import { UserService } from './shared' |
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
@@ -30,8 +29,7 @@ export class AppComponent implements OnInit { | |||
30 | private router: Router, | 29 | private router: Router, |
31 | private authService: AuthService, | 30 | private authService: AuthService, |
32 | private configService: ConfigService, | 31 | private configService: ConfigService, |
33 | private userService: UserService, | 32 | private userService: UserService |
34 | private videoService: VideoService | ||
35 | ) {} | 33 | ) {} |
36 | 34 | ||
37 | ngOnInit () { | 35 | ngOnInit () { |
@@ -43,9 +41,6 @@ export class AppComponent implements OnInit { | |||
43 | } | 41 | } |
44 | 42 | ||
45 | this.configService.loadConfig() | 43 | this.configService.loadConfig() |
46 | this.videoService.loadVideoCategories() | ||
47 | this.videoService.loadVideoLicences() | ||
48 | this.videoService.loadVideoLanguages() | ||
49 | 44 | ||
50 | // Do not display menu on small screens | 45 | // Do not display menu on small screens |
51 | if (window.innerWidth < 600) { | 46 | if (window.innerWidth < 600) { |
diff --git a/client/src/app/core/index.ts b/client/src/app/core/index.ts index 01b12ce7e..31322138f 100644 --- a/client/src/app/core/index.ts +++ b/client/src/app/core/index.ts | |||
@@ -2,4 +2,5 @@ export * from './auth' | |||
2 | export * from './config' | 2 | export * from './config' |
3 | export * from './confirm' | 3 | export * from './confirm' |
4 | export * from './menu' | 4 | export * from './menu' |
5 | export * from './routing' | ||
5 | export * from './core.module' | 6 | export * from './core.module' |
diff --git a/client/src/app/core/routing/index.ts b/client/src/app/core/routing/index.ts new file mode 100644 index 000000000..17f3ee833 --- /dev/null +++ b/client/src/app/core/routing/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './preload-selected-modules-list' | |||
diff --git a/client/src/app/core/routing/preload-selected-modules-list.ts b/client/src/app/core/routing/preload-selected-modules-list.ts new file mode 100644 index 000000000..dd5be6ad9 --- /dev/null +++ b/client/src/app/core/routing/preload-selected-modules-list.ts | |||
@@ -0,0 +1,16 @@ | |||
1 | import { Route, PreloadingStrategy } from '@angular/router'; | ||
2 | import { Observable } from 'rxjs/Observable'; | ||
3 | import 'rxjs/add/observable/timer'; | ||
4 | import 'rxjs/add/operator/switchMap'; | ||
5 | |||
6 | export class PreloadSelectedModulesList implements PreloadingStrategy { | ||
7 | preload(route: Route, load: Function): Observable<any> { | ||
8 | if (!route.data || !route.data.preload) return Observable.of(null); | ||
9 | |||
10 | if (typeof route.data.preload === 'number') { | ||
11 | return Observable.timer(route.data.preload).switchMap(() => load()); | ||
12 | } | ||
13 | |||
14 | return load(); | ||
15 | } | ||
16 | } | ||
diff --git a/client/src/app/videos/+video-edit/index.ts b/client/src/app/videos/+video-edit/index.ts new file mode 100644 index 000000000..63e0414dd --- /dev/null +++ b/client/src/app/videos/+video-edit/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './video-add.module' | ||
2 | export * from './video-update.module' | ||
diff --git a/client/src/app/videos/+video-edit/video-add-routing.module.ts b/client/src/app/videos/+video-edit/video-add-routing.module.ts new file mode 100644 index 000000000..9e8fa4acc --- /dev/null +++ b/client/src/app/videos/+video-edit/video-add-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoAddComponent } from './video-add.component' | ||
7 | |||
8 | const videoAddRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoAddComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoAddRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoAddRoutingModule {} | ||
diff --git a/client/src/app/videos/video-edit/video-add.component.html b/client/src/app/videos/+video-edit/video-add.component.html index 698152ff9..698152ff9 100644 --- a/client/src/app/videos/video-edit/video-add.component.html +++ b/client/src/app/videos/+video-edit/video-add.component.html | |||
diff --git a/client/src/app/videos/video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 21311b184..21311b184 100644 --- a/client/src/app/videos/video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
diff --git a/client/src/app/videos/+video-edit/video-add.module.ts b/client/src/app/videos/+video-edit/video-add.module.ts new file mode 100644 index 000000000..141d33ad2 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-add.module.ts | |||
@@ -0,0 +1,30 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideoAddRoutingModule } from './video-add-routing.module' | ||
6 | import { VideoAddComponent } from './video-add.component' | ||
7 | import { VideoService } from '../shared' | ||
8 | import { SharedModule } from '../../shared' | ||
9 | |||
10 | @NgModule({ | ||
11 | imports: [ | ||
12 | TagInputModule, | ||
13 | |||
14 | VideoAddRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoAddComponent | ||
20 | ], | ||
21 | |||
22 | exports: [ | ||
23 | VideoAddComponent | ||
24 | ], | ||
25 | |||
26 | providers: [ | ||
27 | VideoService | ||
28 | ] | ||
29 | }) | ||
30 | export class VideoAddModule { } | ||
diff --git a/client/src/app/videos/video-edit/video-edit.component.scss b/client/src/app/videos/+video-edit/video-edit.component.scss index 9ee0c520c..9ee0c520c 100644 --- a/client/src/app/videos/video-edit/video-edit.component.scss +++ b/client/src/app/videos/+video-edit/video-edit.component.scss | |||
diff --git a/client/src/app/videos/+video-edit/video-update-routing.module.ts b/client/src/app/videos/+video-edit/video-update-routing.module.ts new file mode 100644 index 000000000..1d06a7ac3 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-update-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoUpdateComponent } from './video-update.component' | ||
7 | |||
8 | const videoUpdateRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoUpdateComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoUpdateRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoUpdateRoutingModule {} | ||
diff --git a/client/src/app/videos/video-edit/video-update.component.html b/client/src/app/videos/+video-edit/video-update.component.html index 7f4faf21b..7f4faf21b 100644 --- a/client/src/app/videos/video-edit/video-update.component.html +++ b/client/src/app/videos/+video-edit/video-update.component.html | |||
diff --git a/client/src/app/videos/video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index 141ed3522..141ed3522 100644 --- a/client/src/app/videos/video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
diff --git a/client/src/app/videos/+video-edit/video-update.module.ts b/client/src/app/videos/+video-edit/video-update.module.ts new file mode 100644 index 000000000..eeb2e35e2 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-update.module.ts | |||
@@ -0,0 +1,30 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideoUpdateRoutingModule } from './video-update-routing.module' | ||
6 | import { VideoUpdateComponent } from './video-update.component' | ||
7 | import { VideoService } from '../shared' | ||
8 | import { SharedModule } from '../../shared' | ||
9 | |||
10 | @NgModule({ | ||
11 | imports: [ | ||
12 | TagInputModule, | ||
13 | |||
14 | VideoUpdateRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoUpdateComponent | ||
20 | ], | ||
21 | |||
22 | exports: [ | ||
23 | VideoUpdateComponent | ||
24 | ], | ||
25 | |||
26 | providers: [ | ||
27 | VideoService | ||
28 | ] | ||
29 | }) | ||
30 | export class VideoUpdateModule { } | ||
diff --git a/client/src/app/videos/+video-watch/index.ts b/client/src/app/videos/+video-watch/index.ts new file mode 100644 index 000000000..b19bfdb1e --- /dev/null +++ b/client/src/app/videos/+video-watch/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './video-watch.module' | |||
diff --git a/client/src/app/videos/video-watch/video-magnet.component.html b/client/src/app/videos/+video-watch/video-magnet.component.html index 484280c45..484280c45 100644 --- a/client/src/app/videos/video-watch/video-magnet.component.html +++ b/client/src/app/videos/+video-watch/video-magnet.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-magnet.component.ts b/client/src/app/videos/+video-watch/video-magnet.component.ts index f9432e92c..f9432e92c 100644 --- a/client/src/app/videos/video-watch/video-magnet.component.ts +++ b/client/src/app/videos/+video-watch/video-magnet.component.ts | |||
diff --git a/client/src/app/videos/video-watch/video-report.component.html b/client/src/app/videos/+video-watch/video-report.component.html index 741080ead..741080ead 100644 --- a/client/src/app/videos/video-watch/video-report.component.html +++ b/client/src/app/videos/+video-watch/video-report.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-report.component.ts b/client/src/app/videos/+video-watch/video-report.component.ts index d9c83a640..d9c83a640 100644 --- a/client/src/app/videos/video-watch/video-report.component.ts +++ b/client/src/app/videos/+video-watch/video-report.component.ts | |||
diff --git a/client/src/app/videos/video-watch/video-share.component.html b/client/src/app/videos/+video-watch/video-share.component.html index 88f59c063..88f59c063 100644 --- a/client/src/app/videos/video-watch/video-share.component.html +++ b/client/src/app/videos/+video-watch/video-share.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-share.component.ts b/client/src/app/videos/+video-watch/video-share.component.ts index 133f93498..133f93498 100644 --- a/client/src/app/videos/video-watch/video-share.component.ts +++ b/client/src/app/videos/+video-watch/video-share.component.ts | |||
diff --git a/client/src/app/videos/+video-watch/video-watch-routing.module.ts b/client/src/app/videos/+video-watch/video-watch-routing.module.ts new file mode 100644 index 000000000..97fa5c725 --- /dev/null +++ b/client/src/app/videos/+video-watch/video-watch-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoWatchComponent } from './video-watch.component' | ||
7 | |||
8 | const videoWatchRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoWatchComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoWatchRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoWatchRoutingModule {} | ||
diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 88863131a..88863131a 100644 --- a/client/src/app/videos/video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 69661747c..69661747c 100644 --- a/client/src/app/videos/video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index db3e1cdd6..874dd5997 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Observable } from 'rxjs/Observable' | 3 | import { Observable } from 'rxjs/Observable' |
4 | import { Subscription } from 'rxjs/Subscription' | 4 | import { Subscription } from 'rxjs/Subscription' |
diff --git a/client/src/app/videos/+video-watch/video-watch.module.ts b/client/src/app/videos/+video-watch/video-watch.module.ts new file mode 100644 index 000000000..5f20b171e --- /dev/null +++ b/client/src/app/videos/+video-watch/video-watch.module.ts | |||
@@ -0,0 +1,34 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { VideoWatchRoutingModule } from './video-watch-routing.module' | ||
4 | import { VideoService } from '../shared' | ||
5 | import { SharedModule } from '../../shared' | ||
6 | |||
7 | import { VideoWatchComponent } from './video-watch.component' | ||
8 | import { VideoReportComponent } from './video-report.component' | ||
9 | import { VideoShareComponent } from './video-share.component' | ||
10 | import { VideoMagnetComponent } from './video-magnet.component' | ||
11 | |||
12 | @NgModule({ | ||
13 | imports: [ | ||
14 | VideoWatchRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoWatchComponent, | ||
20 | |||
21 | VideoMagnetComponent, | ||
22 | VideoShareComponent, | ||
23 | VideoReportComponent | ||
24 | ], | ||
25 | |||
26 | exports: [ | ||
27 | VideoWatchComponent | ||
28 | ], | ||
29 | |||
30 | providers: [ | ||
31 | VideoService | ||
32 | ] | ||
33 | }) | ||
34 | export class VideoWatchModule { } | ||
diff --git a/client/src/app/videos/index.ts b/client/src/app/videos/index.ts index 83edcc758..028a5854b 100644 --- a/client/src/app/videos/index.ts +++ b/client/src/app/videos/index.ts | |||
@@ -1,7 +1 @@ | |||
1 | export * from './shared' | ||
2 | export * from './video-edit' | ||
3 | export * from './video-list' | ||
4 | export * from './video-watch' | ||
5 | export * from './videos-routing.module' | ||
6 | export * from './videos.component' | ||
7 | export * from './videos.module' | export * from './videos.module' | |
diff --git a/client/src/app/videos/video-edit/index.ts b/client/src/app/videos/video-edit/index.ts deleted file mode 100644 index 3b4a9cb87..000000000 --- a/client/src/app/videos/video-edit/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './video-add.component' | ||
2 | export * from './video-update.component' | ||
diff --git a/client/src/app/videos/video-watch/index.ts b/client/src/app/videos/video-watch/index.ts deleted file mode 100644 index 105872469..000000000 --- a/client/src/app/videos/video-watch/index.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export * from './video-magnet.component' | ||
2 | export * from './video-share.component' | ||
3 | export * from './video-report.component' | ||
4 | export * from './video-watch.component' | ||
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' | |||
3 | 3 | ||
4 | import { MetaGuard } from '@ngx-meta/core' | 4 | import { MetaGuard } from '@ngx-meta/core' |
5 | 5 | ||
6 | import { VideoAddComponent, VideoUpdateComponent } from './video-edit' | ||
7 | import { VideoListComponent } from './video-list' | 6 | import { VideoListComponent } from './video-list' |
8 | import { VideosComponent } from './videos.component' | 7 | import { VideosComponent } from './videos.component' |
9 | import { VideoWatchComponent } from './video-watch' | ||
10 | 8 | ||
11 | const videosRoutes: Routes = [ | 9 | const videosRoutes: Routes = [ |
12 | { | 10 | { |
@@ -25,7 +23,7 @@ const videosRoutes: Routes = [ | |||
25 | }, | 23 | }, |
26 | { | 24 | { |
27 | path: 'add', | 25 | path: 'add', |
28 | component: VideoAddComponent, | 26 | loadChildren: 'app/videos/+video-edit#VideoAddModule', |
29 | data: { | 27 | data: { |
30 | meta: { | 28 | meta: { |
31 | title: 'Add a video' | 29 | title: 'Add a video' |
@@ -34,7 +32,7 @@ const videosRoutes: Routes = [ | |||
34 | }, | 32 | }, |
35 | { | 33 | { |
36 | path: 'edit/:uuid', | 34 | path: 'edit/:uuid', |
37 | component: VideoUpdateComponent, | 35 | loadChildren: 'app/videos/+video-edit#VideoUpdateModule', |
38 | data: { | 36 | data: { |
39 | meta: { | 37 | meta: { |
40 | title: 'Edit a video' | 38 | title: 'Edit a video' |
@@ -47,7 +45,10 @@ const videosRoutes: Routes = [ | |||
47 | }, | 45 | }, |
48 | { | 46 | { |
49 | path: 'watch/:uuid', | 47 | path: 'watch/:uuid', |
50 | component: VideoWatchComponent | 48 | loadChildren: 'app/videos/+video-watch#VideoWatchModule', |
49 | data: { | ||
50 | preload: 3000 | ||
51 | } | ||
51 | } | 52 | } |
52 | ] | 53 | ] |
53 | } | 54 | } |
diff --git a/client/src/app/videos/videos.component.ts b/client/src/app/videos/videos.component.ts index 972c2221f..26d9d28d4 100644 --- a/client/src/app/videos/videos.component.ts +++ b/client/src/app/videos/videos.component.ts | |||
@@ -1,8 +1,16 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | |||
3 | import { VideoService } from './shared' | ||
2 | 4 | ||
3 | @Component({ | 5 | @Component({ |
4 | template: '<router-outlet></router-outlet>' | 6 | template: '<router-outlet></router-outlet>' |
5 | }) | 7 | }) |
8 | export class VideosComponent implements OnInit { | ||
9 | constructor(private videoService: VideoService) {} | ||
6 | 10 | ||
7 | export class VideosComponent { | 11 | ngOnInit () { |
12 | this.videoService.loadVideoCategories() | ||
13 | this.videoService.loadVideoLicences() | ||
14 | this.videoService.loadVideoLanguages() | ||
15 | } | ||
8 | } | 16 | } |
diff --git a/client/src/app/videos/videos.module.ts b/client/src/app/videos/videos.module.ts index bc86118cc..3a0c3feac 100644 --- a/client/src/app/videos/videos.module.ts +++ b/client/src/app/videos/videos.module.ts | |||
@@ -1,24 +1,13 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | 2 | ||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideosRoutingModule } from './videos-routing.module' | 3 | import { VideosRoutingModule } from './videos-routing.module' |
6 | import { VideosComponent } from './videos.component' | 4 | import { VideosComponent } from './videos.component' |
7 | import { VideoAddComponent, VideoUpdateComponent } from './video-edit' | ||
8 | import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list' | 5 | import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list' |
9 | import { | ||
10 | VideoWatchComponent, | ||
11 | VideoMagnetComponent, | ||
12 | VideoReportComponent, | ||
13 | VideoShareComponent | ||
14 | } from './video-watch' | ||
15 | import { VideoService } from './shared' | 6 | import { VideoService } from './shared' |
16 | import { SharedModule } from '../shared' | 7 | import { SharedModule } from '../shared' |
17 | 8 | ||
18 | @NgModule({ | 9 | @NgModule({ |
19 | imports: [ | 10 | imports: [ |
20 | TagInputModule, | ||
21 | |||
22 | VideosRoutingModule, | 11 | VideosRoutingModule, |
23 | SharedModule | 12 | SharedModule |
24 | ], | 13 | ], |
@@ -26,18 +15,10 @@ import { SharedModule } from '../shared' | |||
26 | declarations: [ | 15 | declarations: [ |
27 | VideosComponent, | 16 | VideosComponent, |
28 | 17 | ||
29 | VideoAddComponent, | ||
30 | VideoUpdateComponent, | ||
31 | |||
32 | VideoListComponent, | 18 | VideoListComponent, |
33 | VideoMiniatureComponent, | 19 | VideoMiniatureComponent, |
34 | VideoSortComponent, | 20 | VideoSortComponent, |
35 | 21 | ||
36 | VideoWatchComponent, | ||
37 | VideoMagnetComponent, | ||
38 | VideoShareComponent, | ||
39 | VideoReportComponent, | ||
40 | |||
41 | LoaderComponent | 22 | LoaderComponent |
42 | ], | 23 | ], |
43 | 24 | ||