title: Bind checkbox or multi-select dropdown to array in AngularJS?
body: <p>I am new to AngularJS, and am thus confused as how to bind checkboxes or multi-select dropdowns to a separate list.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;body ng-controller="FooListCtrl"&gt;
    &lt;span ng-repeat="foolist in foos"&gt;
      &lt;select ng-model="selected" ng-options="foo for foo in foolist" multiple=""&gt;
      &lt;/select&gt;
    &lt;/span&gt;
  &lt;/body&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  function FooListCtrl($scope) {
      $scope.foos = {"Bar": [ "foo", "bar"]};
      $scope.selected = [];
  }
  
  FooListCtrl.$inject = ['$scope'];
  </code></pre>
  
  <p>Run the code: <a href="http://jsfiddle.net/gBcN2/" rel="nofollow">http://jsfiddle.net/gBcN2/</a></p>