title: Angularjs Select Option Selected Default
body: <p>I started using angularjs in a project. Here i have a quest.
  I have the below HTML</p>
  
  <pre><code>&lt;div&gt;
  &lt;label for="lastname"&gt;Bank Name :&lt;/label&gt; 
  &lt;select ui-select2 ng-model="bank.id"&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;option ng-repeat="bank in banks" value="{{bank.id}}"&gt;{{bank.text}}&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I iterate all the banks to the dropdown. User selects and press SAVE. I correctly got the id and save it to the DB. When the user comes back i could not set the value of the drop down to the one he selected. I do this in the controller.js</p>
  
  <pre><code>$http.get('/AdServerLongTail/api/user').
  success(function(data, status, headers, config) {
      if(status == 200){
          $scope.id = (data["id"]);// user id                 
          $scope.bank.id = (data["bankId"]);                  
      }
  }).
  error(function(data, status, headers, config) {
      alert("fail");
  }); 
  </code></pre>
  
  <p>How can I set it to bankID 11 letssay, which is XX Bank?    </p>