1 import { Injectable } from '@angular/core'
2 import { ActivatedRouteSnapshot } from '@angular/router'
3 import { VideoService } from './video.service'
6 export class VideoResolver {
8 private videoService: VideoService
12 resolve (route: ActivatedRouteSnapshot) {
13 const videoId: string = route.params['videoId']
15 return this.videoService.getVideo({ videoId })