title: angularjs checkbox Incorrect response in console
body: <p>I have two criteria:
  1) Only allow one of two boxes selected at one time.
  2) Capture the name of the box that is selected. </p>
  
  <p>However, when I print out the list of checkbox objects they are correct, but when I check in the console they are not correct. For example,</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-repeat="treatment in treatment_list"&gt;
   &lt;input type="checkbox" value="{{treatment.name}}"
          ng-model="treatment.checked"
          ng-click="updateTreatment($index, treatment_list);
                    checkedTreatment(treatment_list)"&gt;
   &lt;label&gt;Treatment {{treatment.name.toUpperCase()}}&lt;/label&gt;&lt;/input&gt;&lt;br&gt;
  &lt;/div&gt;
  {{treatment_list}}
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>$scope.treatment_list = [
      {
        name: 'a',
        checked: false
      }, {
        name: 'b',
        checked: false
      }
    ];
  
  $scope.updateTreatment = function(position, treatment_list) {
      console.log(treatment_list);
      angular.forEach(treatment_list, function(treatment, index) {
        console.log(treatment.name, treatment.checked);
        if (position != index) {
          treatment.checked = false;
        }
      });
    };
  
  $scope.$watch('treatment.checked', function (treatment) {
      console.log(treatment);
    });
  </code></pre>
  
  <p>Plunker:
  <a href="https://plnkr.co/edit/Hkb4IeKxi0TRqHRJA4JN?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/Hkb4IeKxi0TRqHRJA4JN?p=preview</a></p>