From 573597769b0818b0d73cc410f19e31baf352001c Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Sat, 28 Jun 2025 11:56:55 -0700 Subject: [PATCH] Impliment change detection --- .../src/app/pages/store/catalog/catalog.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 a5e2cf9..67ab682 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 @@ -6,6 +6,7 @@ import { Title } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { Authentication } from '../../../services/Authentication'; import { Product } from 'app/models/Product'; +import { ChangeDetectorRef } from '@angular/core'; @Component({ selector: 'catalog', @@ -17,7 +18,7 @@ export class CatalogComponent { public Products: Product[] = []; - constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) { + constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication, private cdr: ChangeDetectorRef ) { this.title.setTitle("Store | Mistox"); // load each product @@ -30,6 +31,7 @@ export class CatalogComponent { 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; + this.cdr.detectChanges(); }); }); });