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