I have the written that displays "selectable" images using checkboxes. I am trying to bind the selected images (encounter.secureImageUri) to an empty array in my controller using the following code. For some reason though it is not working. Can anyone tell me what I am doing wrong?
HTML:
<div ng-repeat="encounter in encounters.encounters" style="display: flex; flex-direction: row;">
<img class="imgGallerySmall" alt="No capture taken"ng-src="{{encounter.secureImageUri}}" />
<div>
<p>
<input type="checkbox" ng-model="selectedImages" ng-change="updateSelection(encounter.secureImageUri)"/>
</p>
</div>
</div>
Controller:
$scope.selectedImages = [];
$scope.updateSelection = function (item) {
$scope.selectedImages.push(item);
};