diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/core/routing/preload-selected-modules-list.ts | 16 | ||||
-rw-r--r-- | client/src/app/videos/videos.component.ts | 2 |
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 @@ | |||
1 | import { Route, PreloadingStrategy } from '@angular/router'; | 1 | import { Route, PreloadingStrategy } from '@angular/router' |
2 | import { Observable } from 'rxjs/Observable'; | 2 | import { Observable } from 'rxjs/Observable' |
3 | import 'rxjs/add/observable/timer'; | 3 | import 'rxjs/add/observable/timer' |
4 | import 'rxjs/add/operator/switchMap'; | 4 | import 'rxjs/add/operator/switchMap' |
5 | 5 | ||
6 | export class PreloadSelectedModulesList implements PreloadingStrategy { | 6 | export 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 | }) |
8 | export class VideosComponent implements OnInit { | 8 | export 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() |