title: Angularjs select multiple options from object
body: <p>Trying to select multiple options in angularjs regarding to object values</p>
  
  <p>Here is a code:</p>
  
  <pre><code>myapp.controller('myctrl', [
          '$scope',
          function ($scope) {
              $scope.query = {
                  Statuses: {
                      Draft: true,
                      Live: true,
                      Pending: true,
                      Archived: false,
                      Deleted: false
                  }
              };
  
  
          }
      ]);​
  </code></pre>
  
  <p>And html</p>
  
  <pre><code>&lt;div ng-controller="myctrl"&gt;
  &lt;select multiple&gt;
      &lt;option value="Draft" ng:model="query.Statuses['Draft']"&gt;Draft&lt;/option&gt;
      &lt;option value="Pending" ng:model="query.Statuses.Pending"&gt;Pending&lt;/option&gt;
      &lt;option value="Live" ng:model="query.Statuses.Live"&gt;Live&lt;/option&gt;
      &lt;option value="Archived" ng:model="query.Statuses.Archived"&gt;Archived&lt;/option&gt;
      &lt;option value="Deleted" ng:model="query.Statuses.Deleted"&gt;Deleted&lt;/option&gt;
  &lt;/select&gt;
  
      {{query | json}}
  &lt;/div&gt;
  </code></pre>
  
  <p>(Non)working sample on jsfiddle​</p>
  
  <p><a href="http://jsfiddle.net/andrejkaurin/h9fgK/" rel="noreferrer">http://jsfiddle.net/andrejkaurin/h9fgK/</a></p>