Simply, I have an array of objects, [images], that I display perfectly fine on Ng-repeat. When I click one div, I want to see the 'id' property of the particular image that was clicked on in the template.
Function in controller:
angular.forEach(value, function (value, key) {
$scope.images.push({
id: i,
src: ("data:image/jpeg;base64," + value)
});
i = i + 1;
}
$scope.seeOne = function () {
console.log(image.id);
}
My template:
<div id="galscrolldiv" ng-repeat="image in images">
<div ng-click="seeOne()">
<img ng-src="{{images[$index].src}}" width="100%" />
</div>
</div>