commencement de la 'page search'

This commit is contained in:
MiharyR 2021-10-27 01:48:30 +02:00
parent 5f4ecfc7b3
commit 58d80d1a6b
47 changed files with 889 additions and 84 deletions

View file

@ -0,0 +1,34 @@
import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';
import {Video} from "../../../utils/interfaces/video";
@Component({
selector: 'app-video-grid',
templateUrl: './video-grid.component.html',
styleUrls: ['./video-grid.component.scss']
})
export class VideoGridComponent implements OnChanges
{
@Input() tabVideo: Video[] = [];
tabTriplet = [];
ngOnChanges(changes: SimpleChanges): void
{
this.tabTriplet = [];
let n = this.tabVideo.length;
let i = 0;
while(i < n)
{
let triplet = []
let compteur = 0;
while((compteur < 3) && (i < n))
{
triplet.push(this.tabVideo[i]);
i++ ;
compteur++ ;
}
this.tabTriplet.push(triplet)
}
}
}