diff --git a/src/MistoxWebsite.Client/src/app/models/Product.ts b/src/MistoxWebsite.Client/src/app/models/Product.ts index 8676bdd..1904aab 100644 --- a/src/MistoxWebsite.Client/src/app/models/Product.ts +++ b/src/MistoxWebsite.Client/src/app/models/Product.ts @@ -11,5 +11,5 @@ export class Product { export class ProductImage { imageID: number = 0; productID: number = 0; - imageSrc: Blob = new Blob; + imageSrc: string = ""; } \ No newline at end of file diff --git a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.html b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.html index 752147c..3d21045 100644 --- a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.html +++ b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.html @@ -5,8 +5,8 @@ -
- +
+

{{ product.name }}

diff --git a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts index 67ab682..ef207be 100644 --- a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts +++ b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts @@ -30,7 +30,7 @@ export class CatalogComponent { this.Products.forEach(item => { item.images.forEach(img => { http.get("https://mistox.com/api/productimage/get?ProductID=" + img.productID + "&ImageID=" + img.imageID, { responseType: 'blob' }).subscribe(blob => { - img.imageSrc = blob; + img.imageSrc = URL.createObjectURL(blob); this.cdr.detectChanges(); }); }); @@ -39,8 +39,4 @@ export class CatalogComponent { } ) }; - - createImageUrl(blob: Blob): string { - return URL.createObjectURL(blob); - } } \ No newline at end of file