diff options
Diffstat (limited to 'client/src/app/+video-studio/edit/video-studio-edit.resolver.ts')
-rw-r--r-- | client/src/app/+video-studio/edit/video-studio-edit.resolver.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts new file mode 100644 index 000000000..c658be50b --- /dev/null +++ b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | |||
2 | import { Injectable } from '@angular/core' | ||
3 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | ||
4 | import { VideoService } from '@app/shared/shared-main' | ||
5 | |||
6 | @Injectable() | ||
7 | export class VideoStudioEditResolver implements Resolve<any> { | ||
8 | constructor ( | ||
9 | private videoService: VideoService | ||
10 | ) { | ||
11 | } | ||
12 | |||
13 | resolve (route: ActivatedRouteSnapshot) { | ||
14 | const videoId: string = route.params['videoId'] | ||
15 | |||
16 | return this.videoService.getVideo({ videoId }) | ||
17 | } | ||
18 | } | ||