title: Get selected item with ng-options
body: <p>I have an array with attributes and I'm trying to select a certain one on load.</p>
  
  <p>Each of my attributes have attribute object, type object and an array of attributeValues.</p>
  
  <p>I want to select the attribute value with chosen=true</p>
  
  <p><strong>Here's my Angular code:</strong></p>
  
  <pre><code>app.controller('MainCtrl', function($scope) {
    $scope.profileData = { "attributes": [{
          "attribute": {
              "id": 56,
                  "name": "Hárlitur",
                  "typeID": 5,
                  "visibleToUsers": true
          },
              "type": {
              "id": 5,
                  "typeName": "list"
          },
              "attributeValues": [{
              "id": 109,
                  "attributeID": 56,
                  "value": "Ljós",
                  "chosen": true
          }, {
              "id": 110,
                  "attributeID": 56,
                  "value": "Dökkur",
                  "chosen": false
          }],
              "valueText": null
      }]};
  
      $scope.changeValue = function changeValue(attribute, value) {
              alert(JSON.stringify({"attributeID":attribute.attribute.id, "type": attribute.type.typeName, "value":value.id}));
      };
  });
  </code></pre>
  
  <p><strong>Here's my HTML code:</strong></p>
  
  <pre><code>&lt;div ng-repeat="attribute in profileData.attributes"&gt;
          &lt;select ng-change="changeValue(attribute, attributeValue)" ng-options="item.id as item.value for item in attribute.attributeValues" ng-model="attributeValue.id"&gt;&lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Here's my plunker:</strong>
  <a href="http://plnkr.co/edit/VMbmSB?p=preview" rel="nofollow">http://plnkr.co/edit/VMbmSB?p=preview</a></p>