<div class="flex gap-half"> <ng-container *ngFor="let imgId of imageIds; let i = index"> <div *ngIf="i <= galleryLength" [class.last-image]="i === galleryLength"> <a (click)="i === galleryLength && imageIds.length > galleryLength ? openGallery() : openImage(imgId)"> <img eosImage [imageId]="imgId" [width]="100" class="gallery-image" /> <div *ngIf="galleryLength === i && imageIds.length > galleryLength " class="last-image-count"> <span>+{{ imageIds.length - galleryLength }}</span> </div> </a> </div> </ng-container> </div>