<div (click)="switchImg($event)" class="containerImgSmall">
<img
[ngStyle]="imgs.img1.zero.style"
id="1"
src="{{ imgs.img1.zero.src }}"
alt=""
/>
<img
[ngStyle]="imgs.img1.one.style"
id="1"
src="{{ imgs.img1.one.src }}"
alt=""
/>
</div>
Is it possible to replicate this div in html in Angular 10 times using ngFor? The index number is needed to fill the id (1,2,3,4..) and also the properties ngStyle and src. For example ngStyle for first img is imgs.img1.zero.style so I would like to replace the "1" with index so the next two for example should be imgs.img2.zero.style imgs.img3.zero.style. So to give full picture second div should look like this
<div (click)="switchImg($event)" class="containerImgSmall">
<img
[ngStyle]="imgs.img2.zero.style"
id="2"
src="{{ imgs.img2.zero.src }}"
alt=""
/>
<img
[ngStyle]="imgs.img2.one.style"
id="2"
src="{{ imgs.img2.one.src }}"
alt=""
/>
</div>