]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/shared-main/video/video.resolver.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / video.resolver.ts
1 import { Injectable } from '@angular/core'
2 import { ActivatedRouteSnapshot } from '@angular/router'
3 import { VideoService } from './video.service'
4
5 @Injectable()
6 export class VideoResolver {
7 constructor (
8 private videoService: VideoService
9 ) {
10 }
11
12 resolve (route: ActivatedRouteSnapshot) {
13 const videoId: string = route.params['videoId']
14
15 return this.videoService.getVideo({ videoId })
16 }
17 }