diff --git a/src/app/components/inicio/inicio.component.ts b/src/app/components/inicio/inicio.component.ts index 39364c1..96b0865 100644 --- a/src/app/components/inicio/inicio.component.ts +++ b/src/app/components/inicio/inicio.component.ts @@ -123,11 +123,17 @@ export class InicioComponent implements OnInit { promoSeleccionada($event: Producto) { - this.promoAcargar = $event; - if (this.promoAcargar.tieneSinonimos) { - var sector = this.promoAcargar.CodSec; - var codigo = this.promoAcargar.CodArt; - this.getSinonimos(sector, codigo); + if ($event.tieneSinonimos) { + + this.productoService.getProductoById($event.id) + .subscribe((res : Producto) => { + + $event.imagenes = res.imagenes; + this.promoAcargar = $event; + this.getSinonimos(this.promoAcargar.CodSec, this.promoAcargar.CodArt); + }, + error => { console.log(error); }) + } else if (this.popoverDirective) { this.popoverDirective.hide();