diff options
Diffstat (limited to 'client/src/app/videos/video-list/video-trending.component.ts')
-rw-r--r-- | client/src/app/videos/video-list/video-trending.component.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 9108289c9..e80fd7f2c 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts | |||
@@ -1,17 +1,19 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { VideoService } from '../../shared/video/video.service' | ||
5 | import { AbstractVideoList } from 'app/shared/video/abstract-video-list' | 4 | import { AbstractVideoList } from 'app/shared/video/abstract-video-list' |
5 | import { SortField } from '../../shared/video/sort-field.type' | ||
6 | import { VideoService } from '../../shared/video/video.service' | ||
6 | 7 | ||
7 | @Component({ | 8 | @Component({ |
8 | selector: 'my-videos-trending', | 9 | selector: 'my-videos-trending', |
9 | styleUrls: [ '../../shared/video/abstract-video-list.scss' ], | 10 | styleUrls: [ '../../shared/video/abstract-video-list.scss' ], |
10 | templateUrl: '../../shared/video/abstract-video-list.html' | 11 | templateUrl: '../../shared/video/abstract-video-list.html' |
11 | }) | 12 | }) |
12 | export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { | 13 | export class VideoTrendingComponent extends AbstractVideoList implements OnInit { |
13 | titlePage = 'Trending' | 14 | titlePage = 'Trending' |
14 | currentRoute = '/videos/trending' | 15 | currentRoute = '/videos/trending' |
16 | defaultSort: SortField = '-views' | ||
15 | 17 | ||
16 | constructor (protected router: Router, | 18 | constructor (protected router: Router, |
17 | protected route: ActivatedRoute, | 19 | protected route: ActivatedRoute, |
@@ -24,10 +26,6 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, | |||
24 | super.ngOnInit() | 26 | super.ngOnInit() |
25 | } | 27 | } |
26 | 28 | ||
27 | ngOnDestroy () { | ||
28 | super.ngOnDestroy() | ||
29 | } | ||
30 | |||
31 | getVideosObservable () { | 29 | getVideosObservable () { |
32 | return this.videoService.getVideos(this.pagination, this.sort) | 30 | return this.videoService.getVideos(this.pagination, this.sort) |
33 | } | 31 | } |