2021-12-23 12:20:07 +00:00
|
|
|
import {Component, OnInit} from '@angular/core';
|
2021-12-28 10:29:25 +00:00
|
|
|
import {ProductService} from '../../service/productservice';
|
|
|
|
import {PhotoService} from '../../service/photoservice';
|
|
|
|
import {Product} from '../../api/product';
|
2021-12-23 12:20:07 +00:00
|
|
|
|
|
|
|
@Component({
|
2021-12-28 10:29:25 +00:00
|
|
|
selector: 'app-media',
|
|
|
|
templateUrl: './media.component.html',
|
2021-12-23 12:20:07 +00:00
|
|
|
styleUrls: ['../../../assets/demo/badges.scss'],
|
|
|
|
styles:[`
|
|
|
|
:host ::ng-deep .p-carousel-indicators .p-link{
|
|
|
|
border-radius:5px !important;
|
|
|
|
}
|
|
|
|
`]
|
|
|
|
})
|
2021-12-28 10:29:25 +00:00
|
|
|
export class MediaComponent implements OnInit {
|
2021-12-23 12:20:07 +00:00
|
|
|
|
|
|
|
products: Product[];
|
|
|
|
|
|
|
|
images: any[];
|
|
|
|
|
|
|
|
galleriaResponsiveOptions: any[] = [
|
|
|
|
{
|
|
|
|
breakpoint: '1024px',
|
|
|
|
numVisible: 5
|
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '960px',
|
|
|
|
numVisible: 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '768px',
|
2021-12-23 13:21:31 +00:00
|
|
|
numVisible: 3
|
2021-12-23 12:20:07 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '560px',
|
|
|
|
numVisible: 1
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
carouselResponsiveOptions: any[] = [
|
|
|
|
{
|
|
|
|
breakpoint: '1024px',
|
|
|
|
numVisible: 3,
|
|
|
|
numScroll: 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '768px',
|
2021-12-23 13:13:38 +00:00
|
|
|
numVisible: 2,
|
|
|
|
numScroll: 2
|
2021-12-23 12:20:07 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
breakpoint: '560px',
|
|
|
|
numVisible: 1,
|
|
|
|
numScroll: 1
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
constructor(private productService: ProductService, private photoService: PhotoService) {}
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
this.productService.getProductsSmall().then(products => {
|
|
|
|
this.products = products;
|
|
|
|
});
|
|
|
|
|
|
|
|
this.photoService.getImages().then(images => {
|
|
|
|
this.images = images;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|