title: Angular ng-repeat in dropdown
body: <p>I'm trying to do this with <code>ng-repeat</code> in Angular:</p>
  
  <pre><code>   &lt;select ng-model="selected_item"&gt;
          &lt;option ng-repeat="item in items" value="{{item.id}}"
                  ng-change="doSomething(selected_item)"&gt;
          {{item.name}} - {{item.another_attribute}}
          &lt;/option&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>and getting the error <code>No controller: ngModel</code>. </p>
  
  <p>Usually I construct dropdowns with <code>ng-options</code> but since the label of the options are made up of two different attributes, it doesn't work.</p>
  
  <pre><code>&lt;select ng-model="selected_item" 
          ng-options="item.id as item.name for item in items" 
          ng-change="doSomething(selected_item)"&gt;
  </code></pre>
  
  <p>As you can see I cannot use two attributes here for the label.</p>
  
  <p>Any ideas?</p>