-import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'
+import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { Subscription } from 'rxjs/Subscription'
import { BehaviorSubject } from 'rxjs/BehaviorSubject'
VideoService,
VideoPagination
} from '../shared'
-import { AuthService, AuthUser } from '../../core'
import { Search, SearchField, SearchService } from '../../shared'
@Component({
totalItems: null
}
sort: SortField
- user: AuthUser = null
videos: Video[] = []
private search: Search
constructor (
private notificationsService: NotificationsService,
- private authService: AuthService,
- private changeDetector: ChangeDetectorRef,
private router: Router,
private route: ActivatedRoute,
private videoService: VideoService,
) {}
ngOnInit () {
- if (this.authService.isLoggedIn()) {
- this.user = AuthUser.load()
- }
-
// Subscribe to route changes
this.subActivatedRoute = this.route.params.subscribe(routeParams => {
this.loadRouteParams(routeParams)