aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/core/routing/preload-selected-modules-list.ts16
-rw-r--r--client/src/app/videos/videos.component.ts2
2 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/core/routing/preload-selected-modules-list.ts b/client/src/app/core/routing/preload-selected-modules-list.ts
index dd5be6ad9..8a458ec3e 100644
--- a/client/src/app/core/routing/preload-selected-modules-list.ts
+++ b/client/src/app/core/routing/preload-selected-modules-list.ts
@@ -1,16 +1,16 @@
1import { Route, PreloadingStrategy } from '@angular/router'; 1import { Route, PreloadingStrategy } from '@angular/router'
2import { Observable } from 'rxjs/Observable'; 2import { Observable } from 'rxjs/Observable'
3import 'rxjs/add/observable/timer'; 3import 'rxjs/add/observable/timer'
4import 'rxjs/add/operator/switchMap'; 4import 'rxjs/add/operator/switchMap'
5 5
6export class PreloadSelectedModulesList implements PreloadingStrategy { 6export class PreloadSelectedModulesList implements PreloadingStrategy {
7 preload(route: Route, load: Function): Observable<any> { 7 preload (route: Route, load: Function): Observable<any> {
8 if (!route.data || !route.data.preload) return Observable.of(null); 8 if (!route.data || !route.data.preload) return Observable.of(null)
9 9
10 if (typeof route.data.preload === 'number') { 10 if (typeof route.data.preload === 'number') {
11 return Observable.timer(route.data.preload).switchMap(() => load()); 11 return Observable.timer(route.data.preload).switchMap(() => load())
12 } 12 }
13 13
14 return load(); 14 return load()
15 } 15 }
16} 16}
diff --git a/client/src/app/videos/videos.component.ts b/client/src/app/videos/videos.component.ts
index 26d9d28d4..80ff46a0a 100644
--- a/client/src/app/videos/videos.component.ts
+++ b/client/src/app/videos/videos.component.ts
@@ -6,7 +6,7 @@ import { VideoService } from './shared'
6 template: '<router-outlet></router-outlet>' 6 template: '<router-outlet></router-outlet>'
7}) 7})
8export class VideosComponent implements OnInit { 8export class VideosComponent implements OnInit {
9 constructor(private videoService: VideoService) {} 9 constructor (private videoService: VideoService) {}
10 10
11 ngOnInit () { 11 ngOnInit () {
12 this.videoService.loadVideoCategories() 12 this.videoService.loadVideoCategories()