import { Injectable } from 'angular2/core'; import { Http, Response } from 'angular2/http'; import { Observable } from 'rxjs/Rx'; import { Video } from '../models/video'; import { AuthService } from '../../users/services/auth.service'; @Injectable() export class VideosService { private _baseVideoUrl = '/api/v1/videos/'; constructor (private http: Http, private _authService: AuthService) {} getVideos() { return this.http.get(this._baseVideoUrl) .map(res => res.json()) .catch(this.handleError); } getVideo(id: string) { return this.http.get(this._baseVideoUrl + id) .map(res =>