I have a php api which updates my database, but I would like to control which item is updated with ng-click.
    app.controller('ReviewProductsController', function ($scope, $http) {
      $scope.hide_product = function () {
        $scope.message = "";
            var request = $http({
              method: "post",
              url: "/data/hideProduct.php",
              data: {
                product_code: $scope.product_code
              },
              headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
            });
      /* Check whether the HTTP Request is Successfull or not. */
      request.success(function (data) {
        $scope.message = "Product Hidden: "+data;
      });
      }
    });
How would I pass $scope.product_code to the controller from ng-click?
<tr ng-repeat="product in productsList.Items">
  <td>{{ product.product_code.S }}</td>
  ...
  <td>
    <button ng-click="hide_product()" type="button">Hide</button>
  </td>
</tr>
 
    