<div *ngFor="let image of _albums; let i=index"> <img [src]="image.thumb" (click)="open(i)" /> </div>