]>
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' | |
202f6b6c | 4 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
f3aaa9a9 C |
5 | import { SortField } from '../../shared/video/sort-field.type' |
6 | import { VideoService } from '../../shared/video/video.service' | |
9bf9d2a5 C |
7 | |
8 | @Component({ | |
9 | selector: 'my-videos-recently-added', | |
202f6b6c C |
10 | styleUrls: [ '../../shared/video/abstract-video-list.scss' ], |
11 | templateUrl: '../../shared/video/abstract-video-list.html' | |
9bf9d2a5 | 12 | }) |
f3aaa9a9 | 13 | export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit { |
9bf9d2a5 | 14 | titlePage = 'Recently added' |
2bbb3412 | 15 | currentRoute = '/videos/recently-added' |
f3aaa9a9 | 16 | sort: SortField = '-createdAt' |
9bf9d2a5 C |
17 | |
18 | constructor (protected router: Router, | |
19 | protected route: ActivatedRoute, | |
20 | protected notificationsService: NotificationsService, | |
21 | private videoService: VideoService) { | |
22 | super() | |
23 | } | |
24 | ||
25 | ngOnInit () { | |
26 | super.ngOnInit() | |
27 | } | |
28 | ||
9bf9d2a5 C |
29 | getVideosObservable () { |
30 | return this.videoService.getVideos(this.pagination, this.sort) | |
31 | } | |
32 | } |