title: Angularjs populate select options with json
body: <p>I am looking to populate select option with values from a basic json array.</p>
  
  <p>The example I have is a country select.  Each country has an id element and a name plus other fields that I can ignore.  Basically I would like to say put one value in the <code>value=""</code> field and another between the <code>&lt;option&gt;tags&lt;/option&gt;</code></p>
  
  <p><strong>html snippet</strong></p>
  
  <pre><code>&lt;div ng-controller="DemoCtrl"&gt;
  
    &lt;p&gt;populate select options with ajax&lt;/p&gt;
  
      &lt;select id="Country" name="Country" class="form-control" size="10" 
          ng-model ="chooseCountries"&gt;                                
              &lt;option ng:repeat="country in chooseCountries" value="{{country.id}}"&gt;     
                  {{country.name}}
              &lt;/option&gt;
      &lt;/select&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>javascript snippet</strong></p>
  
  <pre><code>'use strict';
  
  function DemoSelectCtrl($scope) {
  
      $scope.chooseCountries=[
          {countryId : 1, name : "France - Mainland", desc: "some description" },
          {countryId : 3, name : "Gibraltar", desc: "some description"},
          {countryId : 3, name : "Malta", desc: "some description"}
      ];  
  
  });
  </code></pre>
  
  <p>I have put it together here <strong><a href="http://jsfiddle.net/e31k5e6L/" rel="noreferrer">js fiddle</a></strong>..  I think I'm missing something</p>