]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/video-list/video-trending.component.ts
9108289c918d3e088c35a0320fb682f2d8f01fac
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-trending.component.ts
1 import { Component, OnDestroy, OnInit } from '@angular/core'
2 import { ActivatedRoute, Router } from '@angular/router'
3 import { NotificationsService } from 'angular2-notifications'
4 import { VideoService } from '../../shared/video/video.service'
5 import { AbstractVideoList } from 'app/shared/video/abstract-video-list'
6
7 @Component({
8 selector: 'my-videos-trending',
9 styleUrls: [ '../../shared/video/abstract-video-list.scss' ],
10 templateUrl: '../../shared/video/abstract-video-list.html'
11 })
12 export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy {
13 titlePage = 'Trending'
14 currentRoute = '/videos/trending'
15
16 constructor (protected router: Router,
17 protected route: ActivatedRoute,
18 protected notificationsService: NotificationsService,
19 private videoService: VideoService) {
20 super()
21 }
22
23 ngOnInit () {
24 super.ngOnInit()
25 }
26
27 ngOnDestroy () {
28 super.ngOnDestroy()
29 }
30
31 getVideosObservable () {
32 return this.videoService.getVideos(this.pagination, this.sort)
33 }
34 }