commencement de la 'page search'
This commit is contained in:
parent
5f4ecfc7b3
commit
58d80d1a6b
47 changed files with 889 additions and 84 deletions
33
src/app/user/search/video-cell/video-cell.component.ts
Normal file
33
src/app/user/search/video-cell/video-cell.component.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {VideoUrlService} from "../../../utils/services/videoUrl/video-url.service";
|
||||
import {PlaylistService} from "../../../utils/services/playlist/playlist.service";
|
||||
import {Video} from "../../../utils/interfaces/video";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-video-cell',
|
||||
templateUrl: './video-cell.component.html',
|
||||
styleUrls: ['./video-cell.component.scss']
|
||||
})
|
||||
export class VideoCellComponent implements OnInit
|
||||
{
|
||||
@Input() video: Video;
|
||||
safeUrl;
|
||||
|
||||
|
||||
constructor( private videoUrlService: VideoUrlService,
|
||||
private playlistService: PlaylistService ) {}
|
||||
|
||||
|
||||
ngOnInit(): void
|
||||
{
|
||||
this.safeUrl = this.videoUrlService.safeUrl(this.video.url);
|
||||
}
|
||||
|
||||
|
||||
onAdd(): void
|
||||
{
|
||||
this.playlistService.addVideoToPlaylists(this.video)
|
||||
console.log("onAdd:" + this.video.title);
|
||||
}
|
||||
}
|
||||
Reference in a new issue