title: Angularjs UI Bootstrap modal -- Checkboxes checked state not being update
body: <p>I am using the AngularJs ui bootstrap modal.  I have a page with checkboxes.  When the user checks on the checkboxes and click on a button, it passes the checked checkboxes to the modal:</p>
  
  <pre><code>var modalInstance = $modal.open({
     templateUrl: 'myModalContent.html',
     controller: ModalInstanceCtrl,
     resolve: {
       checkedSearches: function () {
           var checkedSearches = [];
           angular.forEach($scope.searches, function(search)
               {
                   if(search.checked) {
                       checkedSearches.push(search);
                   }
               });
  
              return checkedSearches;
        }
     }
   });
  </code></pre>
  
  <p>In my modal, we redisplay the data as checkboxes again.  The user can select/unselect the checkboxes and click save, and it will save all the selected checkboxes.  </p>
  
  <pre><code>var ModalInstanceCtrl = function ($scope, $modalInstance, checkedSearches) {
      $scope.checkedSearches = checkedSearches;
  
       var saveSearches = [];
       angular.forEach($scope.checkSearches, function(search)
                {
                    if(search.checked) {
                        saveSearches.push(search);
                    }
                });
  
  } 
  </code></pre>
  
  <p>Issue, is that, it is saving ALL the checkboxes.  Seems as though the checked property stays with the checkboxes, even though the user unchecks it in the modal. I haven't include the code to save the searches.  I basically pushed on to the searchSearches array, and it seems to be pushing all the checkboxes, including unchecked ones.</p>
  
  <p>Here is my view/modal for the checkboxes:</p>
  
  <pre><code>&lt;tr ng-repeat="search in checkedSearches"&gt;
      &lt;td&gt;&lt;input type="checkbox" ng-checked="search.checked" name="search" ng-model="search.checked" /&gt;&lt;/td&gt;&lt;td&gt;{{search.id}}&lt;/td&gt;&lt;td&gt;{{search.name}}&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>