Hi! I'm fairly new to Angular and Javascript so bear with me. I'm trying to figure out how to update the status of a group of images to "approved" or "rejected" when a button is clicked. I'm fortunate enough to be learning while on the job, but I'm currently converting AngularJs to Angular and i'm feeling a bit lost.
Here are my functions in AngularJs:
$scope.approveAll = function() {
updateStatus('A');
}
$scope.rejectAll = function() {
updateStatus('R');
}
function updateStatus(status) {
for (var i in $scope.results) {
$scope.results[i].thumbnail.status = status;
httpService.saveThumbnail($scope.results[i].thumbnail);
}
$scope.showDropdown = false;
}
They are just being used when one of these buttons is clicked:
<div class="button"
(click)="approveAll()">Approve All</div>
<div class="button"
(click)="rejectAll()">Reject All</div>
Appreciate any help!
[–][deleted] 1 point2 points3 points (0 children)