title: how to make ng-model value set by ui-select value
body: <p>I am currently using angular-ui/ui-select in my project. I am able to bind the value of the ui-select to an object without issue, however it is binding the entire <code>item</code> that is being iterated over.  I would like to only bind based on the <code>item.codeId</code> this would allow me to persist the correct data as well as display the correct value in the drop down when the page is loaded.</p>
  
  <p>How can I setup ui-select to do this?</p>
  
  <pre><code>&lt;ui-select ng-model="myObject.stateCode" id="stateCode"&gt;
      &lt;ui-select-match placeholder="Select a state..."&gt;{{$select.selected.codeDescription}}&lt;/ui-select-match&gt;
      &lt;ui-select-choices repeat="item in constants.states | filter: $select.search" value="{{$select.selected.codeId}}"&gt;
          &lt;div ng-bind-html="item.codeDescription | highlight: $select.search"&gt;&lt;/div&gt;
          &lt;small ng-bind-html="item.codeId | highlight: $select.search"&gt;&lt;/small&gt;
      &lt;/ui-select-choices&gt;
  &lt;/ui-select&gt;
  </code></pre>