title: Bind JSON object to radio button in angularjs
body: <p>So I am trying to bind radio buttons to objects. I have spent like an hour trying to figure this up and at last admit defeat. Here's what I got:</p>
  <pre><code>&lt;table&gt;
          &lt;tr ng-repeat=&quot;theCustomer in customers&quot;&gt;
              &lt;td&gt;
                  &lt;input type=&quot;radio&quot; ng-model=&quot;currentCustomer&quot; value=&quot;theCustomer&quot; id=&quot;{{theCustomer.id}}&quot; ng-change=&quot;currentCustomer = theCustomer&quot;&gt;
                  &lt;label for=&quot;{{theCustomer.id}}&quot;&gt;{{theCustomer.name}}&lt;/label&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>The angular stuff:</p>
  <pre><code>bankApp.controller(&quot;BankController&quot;, function ($scope, CustomerRepository)
  {
      $scope.customers = [];
      $scope.currentCustomer = {};
      
      $scope.createCustomer = function () {
          CustomerRepository.save($scope.customer, function (customer) {
              $scope.customers.push(customer);
              $scope.customer = {};
          });
      };
  });
  </code></pre>
  <p>Currently, when I try and click on a radio button nothing happens, it doesn't even get checked. I'm sure there's got to be a really simple solution to this. The end goal is to have <code>currentCustomer</code> hold the customer reflected in the radio selection.</p>