对不起,这是我的新问题,以前有一个问题是用新问题编辑这个..
这是我的新问题我已经创建了一个带有滑块的图像弹出窗口,在单击图像库中的一个图像时,我需要在弹出窗口和滑块中显示特定图像,我使用 NgFor 作为图像库,在弹出窗口期间我使用另一个 ngFor滑块,我需要可点击的图像 id 并在弹出窗口中显示特定的图像,我正在使用 ngrx-store 这是我的代码,
<div class="swiper-slide " *ngFor="let picture of pictures; let i = index">
<div class="zoomImage" >
<img class="img-fluid GridImage"
(click)="lgModal.show()"
src="{{picture.regularUrl}}">
</div>
</div>
<div *ngIf="pictures.length%2 !=0" class="swiper-slide ">
<!--<img class="img-fluid GridImage"-->
<!--src="../../assets/images/dummy-image.jpg" />-->
<img class="img-fluid GridImage"
src="http://dev.rileyblakedesigns.com/media/productimage-
picture-c120-lightgray-27516.jpg"/>
</div>
<!--</swiper>-->
<div bsModal #lgModal="bs-modal" class="modal fade" tabindex="-1"
data-a8n="popUp OverLay" id="backgroundPopUp"
role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<button type="button" class="close pull-right"
data-a8n="PopUp Close Button" id="popCloseBtn"
(click)="lgModal.hide()" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<carousel [interval]="'false'" [noWrap]="'true'" id="thumbChange" >
<div style=" " class="closeDiv"
(click)="lgModal.hide()" >
<div class="modal-dialog modal-lg">
<div class="modal-content" >
<div class="modal-body">
<slide *ngFor="let picture of pictures; let i = index" >
<div >
<img class="img-fluid popUpImage"
src="{{picture.regularUrl}}" >
<div class="pull-right imageCount"
">
<h6 class="countPic" >{{i+1}} of {{
pictures.length}}</h6>
</div>
</div>
</slide>
</div>
</div>
</div>
</div>
<div class="PopUp-Thumbnail" data-a8n="PopUp-Thumbnail"
style="">
<span *ngFor="let picture of pictures; let i = index" >
<img class="img-fluid GridImagePopUp active"
id="thumbnailImage"
src="{{picture.thumbnailUrl}}">
</span>
</div>
</carousel>
</div>