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