-import { Component, ElementRef, OnInit } from '@angular/core'
+import { Component, OnInit } from '@angular/core'
import { FormBuilder, FormGroup } from '@angular/forms'
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
-import { AuthService } from '../../core'
+import { ServerService } from '../../core'
import {
FormReactive,
VIDEO_NAME,
fileError = ''
constructor (
- private authService: AuthService,
- private elementRef: ElementRef,
private formBuilder: FormBuilder,
private route: ActivatedRoute,
private router: Router,
private notificationsService: NotificationsService,
+ private serverService: ServerService,
private videoService: VideoService
) {
super()
ngOnInit () {
this.buildForm()
- this.videoCategories = this.videoService.videoCategories
- this.videoLicences = this.videoService.videoLicences
- this.videoLanguages = this.videoService.videoLanguages
+ this.videoCategories = this.serverService.getVideoCategories()
+ this.videoLicences = this.serverService.getVideoLicences()
+ this.videoLanguages = this.serverService.getVideoLanguages()
const uuid: string = this.route.snapshot.params['uuid']
this.videoService.getVideo(uuid)