title: How to bind an array to select by Angularjs?
body: <p>I am trying to bind an object array to a select drop down, but I cannot figure out how to make this work, can someone suggest how to make this work?</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div ng-app ng-controller="DisplayCtrl"&gt;
  &lt;select ng-model="eventName" ng-options="name.event for name in eventNames"&gt;
      &lt;option value=""&gt;Select Event&lt;/option&gt;
  &lt;/select&gt;
  &lt;p&gt;Currently selected: {{eventName.description}} &lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>AngularJS:</strong></p>
  
  <pre><code>function DisplayCtrl($scope) {
  $scope.eventNames = [{
      event: "Function A",
      description: "Gaming"
  }, {
      event: "Function B",
      description: "Basketball"
  }, {
      event: "Function C",
      description: "Football"
  }, {
      event: "Function D",
      description: "Dancing"
  }];
  $scope.eventName = $scope.eventNames[1].event;}
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ztABS/" rel="nofollow">http://jsfiddle.net/ztABS/</a></p>