I have a function that loads product data from a database. This data will be loaded into html using * ngFor.
After uploading the data, I intend to upload the image for this product ID. That is, I try to pass the product ID and I have perform the function of getting images, with id I get.
The problem is that * ngFor goes into a continuous loop and neither images load :(
The problem will be in this line, because if the comment code runs without any infinite loop. (of course not upload images):
<img *ngIf="inView" [src]="ImageInfo(product.id)" class="Images img-fluid" alt="" (click)="fillModal($event)">
HTML
<div class="container-fluid first" style="cursor: pointer;" data-toggle="modal" data-target="#modalPoll">
<div class="row tab-pane Galeria">
<div *ngFor="let product of products" class="col-xl-2 col-lg-3 col-md-4 col-sm-6">
<div class="image-item">
<homeImage>
<a class="d-block image-block h-100">
<img *ngIf="inView" [src]="ImageInfo(product.id)" class="Images img-fluid" alt="" (click)="fillModal($event)">
</a>
</homeImage>
<div class="ImageText"> {{product.name}}</div>
</div>
</div>
</div>
</div>