I want to update Num of $code, using PHP and AngularJS; but it updates only the last ng-repeat value, and not the clicked one.
Num
$code
ng-repeat
HTM
Pass your x object as param to update function..
x
Update $scope.update = function(x){ $http.post("http://localhost/deb/update.php", { 'Code' :x.Code, } ).success(function(data){ alert(data); $scope.thisX = $state.params.Num; }); }