]>
Commit | Line | Data |
---|---|---|
f3aaa9a9 | 1 | import { Component, OnInit } from '@angular/core' |
9bf9d2a5 C |
2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | |
b2731bff | 4 | import { AuthService } from '../../core/auth' |
7bfd1b1e | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
f3aaa9a9 C |
6 | import { SortField } from '../../shared/video/sort-field.type' |
7 | import { VideoService } from '../../shared/video/video.service' | |
9bf9d2a5 C |
8 | |
9 | @Component({ | |
10 | selector: 'my-videos-trending', | |
202f6b6c C |
11 | styleUrls: [ '../../shared/video/abstract-video-list.scss' ], |
12 | templateUrl: '../../shared/video/abstract-video-list.html' | |
9bf9d2a5 | 13 | }) |
f3aaa9a9 | 14 | export class VideoTrendingComponent extends AbstractVideoList implements OnInit { |
9bf9d2a5 | 15 | titlePage = 'Trending' |
2bbb3412 | 16 | currentRoute = '/videos/trending' |
f3aaa9a9 | 17 | defaultSort: SortField = '-views' |
9bf9d2a5 C |
18 | |
19 | constructor (protected router: Router, | |
20 | protected route: ActivatedRoute, | |
21 | protected notificationsService: NotificationsService, | |
b2731bff | 22 | protected authService: AuthService, |
9bf9d2a5 C |
23 | private videoService: VideoService) { |
24 | super() | |
25 | } | |
26 | ||
27 | ngOnInit () { | |
28 | super.ngOnInit() | |
29 | } | |
30 | ||
9bf9d2a5 C |
31 | getVideosObservable () { |
32 | return this.videoService.getVideos(this.pagination, this.sort) | |
33 | } | |
34 | } |