image video à la place de iframe

This commit is contained in:
MiharyR 2021-11-19 15:42:51 +01:00
parent 500b32626e
commit b045f507d2
92 changed files with 945 additions and 656 deletions

View file

@ -0,0 +1,27 @@
import {Component, Input, OnInit} from '@angular/core';
import {Advert} from "../../../../utils/interfaces/advert";
import {ThemeService} from "../../../../utils/services/theme/theme.service";
@Component({
selector: 'app-advert',
templateUrl: './advert.component.html',
styleUrls: ['./advert.component.scss']
})
export class AdvertComponent implements OnInit
{
@Input() ad: Advert;
idxImage: number = 0;
constructor(public themeService: ThemeService) { }
ngOnInit(): void
{
const nbImages = this.ad.images.length;
this.idxImage = Math.floor(Math.random() * nbImages);
}
}