blob: e80fd7f2cc97cb276aec0b3de0083890528a4d44 (
plain) (
tree)
|
|
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
import { AbstractVideoList } from 'app/shared/video/abstract-video-list'
import { SortField } from '../../shared/video/sort-field.type'
import { VideoService } from '../../shared/video/video.service'
@Component({
selector: 'my-videos-trending',
styleUrls: [ '../../shared/video/abstract-video-list.scss' ],
templateUrl: '../../shared/video/abstract-video-list.html'
})
export class VideoTrendingComponent extends AbstractVideoList implements OnInit {
titlePage = 'Trending'
currentRoute = '/videos/trending'
defaultSort: SortField = '-views'
constructor (protected router: Router,
protected route: ActivatedRoute,
protected notificationsService: NotificationsService,
private videoService: VideoService) {
super()
}
ngOnInit () {
super.ngOnInit()
}
getVideosObservable () {
return this.videoService.getVideos(this.pagination, this.sort)
}
}
|