diff options
Diffstat (limited to 'client/src/app/videos/video-list/video-recently-added.component.ts')
-rw-r--r-- | client/src/app/videos/video-list/video-recently-added.component.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts new file mode 100644 index 000000000..6168fac95 --- /dev/null +++ b/client/src/app/videos/video-list/video-recently-added.component.ts | |||
@@ -0,0 +1,32 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { ActivatedRoute, Router } from '@angular/router' | ||
3 | import { NotificationsService } from 'angular2-notifications' | ||
4 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | ||
5 | import { SortField } from '../../shared/video/sort-field.type' | ||
6 | import { VideoService } from '../../shared/video/video.service' | ||
7 | |||
8 | @Component({ | ||
9 | selector: 'my-videos-recently-added', | ||
10 | styleUrls: [ '../../shared/video/abstract-video-list.scss' ], | ||
11 | templateUrl: '../../shared/video/abstract-video-list.html' | ||
12 | }) | ||
13 | export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit { | ||
14 | titlePage = 'Recently added' | ||
15 | currentRoute = '/videos/recently-added' | ||
16 | sort: SortField = '-createdAt' | ||
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 | |||
29 | getVideosObservable () { | ||
30 | return this.videoService.getVideos(this.pagination, this.sort) | ||
31 | } | ||
32 | } | ||