title: Set selected value for select menu
body: <p>I want to set selected value for select menu. Values are coming from $stateParams. So I am using ui-router and select menu is in the child state. Here is what i try.</p>
  
  <p>This is works but i cant pull the i.</p>
  
  <p>Javascript:    </p>
  
  <pre><code>.controller('nbgCtrl',function  ($scope, MMG, $stateParams) {
  var milo = $stateParams.serix;
  var musti = $stateParams.klasor;
  MMG.adlar.success(function(loHemen, milo, musti) {
  var i;
  for (i=0; i&lt;loHemen.length; i++) {
      if (loHemen[i].seri===milo) {
         break;
      };
  
  };
  console.log(i);
  $scope.mangalar = loHemen;
  $scope.selManga = $scope.mangalar[0];
  });
  
  .factory('MMG', function($http){
  var fveg= {};
  var url = 'http://api.example.com/manga?callback=JSON_CALLBACK';
  fveg.adlar = $http.jsonp(url);
  return fveg;
  })
  </code></pre>
  
  <p>Html:</p>
  
  <pre><code>&lt;select ng-model="selManga" ng-options="manga.seri for manga in mangalar"&gt;
      &lt;option value=""&gt;Select a Manga&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>JSON:</p>
  
  <pre><code>[{"seri": "Naruto",
    "randomword": [{
              "klasor": "138",
              "yol": [
              ]
          },
          {
              "klasor": "300",
              "yol": [
  
              ]
          }
      ]
  },
  {
   "seri": "One Piece",
   "randomword": [
          {
              "klasor": "137",
              "yol": [
  
              ]
          }
      ]
  }
  ])
  </code></pre>