我用fancybox创建了一个ng-repeat循环图像来显示它们。我添加了一个ng-click来触发控制器功能,该功能定义了所选择的图像' var和一切都很好。我正在寻找一种方法来更新所选图像'使用箭头更改图像时的var。我尝试过使用ng-change,但到目前为止还没有运气。
$scope.openPopUp = function(picture) {
$scope.selectedPicture = picture;
};

<div class="col-md-4 col-sm-4 mix" ng-repeat="picture in $parent.campaign.pictures">
<a href="{{picture.facebookPicture.source}}" class="transparent-box campaign-picture-popup" rel="campaign-picture-popup" title="My title" ng-click="openPopUp(picture)">
<div class="campaign_picturs_grid_col" style="background-image: url('{{picture.facebookPicture.source}}')">
<div class="campaign_picture_user_info"></div>
</div>
</a>
</div>
&#13;