title: How to save values from multiple select box which is populated using ng-repeat in angularjs?
body: <p>I have a list of select boxes. On change of each select box, i need to save the selected option in a variable (can be array not sure). As of now I am able to save the selected value in a variable if there is only ONE select box. How do i do it if I have a group of select boxes which has been populated using ng-repeat? I am able to display the changed value (in the h4 tag on the page). But I want to save that value into a variable. How do I do that?</p>
  
  <p><a href="https://jsfiddle.net/r3bw4qka/3/" rel="nofollow">Link to Fiddle</a>
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var app=angular.module("myApp",[]);
  app.controller("myCtrl",function($scope){
    $scope.GetValue = function(value){
   alert($scope.lengthPwd);
    }
    
   $scope.parameterList = [
   {id:"one", text:'Is it red in color?', done:true},
   {id:"two", text:'Is it square shaped?', done:false},
   {id:"three", text:'Does it have vowels?', done:false},
   {id: "four", text:'Allow Repeated characters?', done:true}
   ];
  
   $scope.range = function(min, max, step){
   step = step || 1;
   var input = [];
   for (var i = min; i &lt;= max; i += step) input.push(i);
   return input;
    }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"&gt;&lt;/script&gt;
  &lt;body ng-app="myApp"&gt;
  &lt;div ng-controller="myCtrl"&gt;
   
  &lt;label&gt;Enter the total length
  &lt;select class="form-control col-md-6" ng-change="GetValue()" ng-model="lengthPwd"&gt;
  &lt;option ng-repeat="n in range(1,100)"&gt;{{n}}&lt;/option&gt;
  &lt;/select&gt;
  &lt;/label&gt;
  
  &lt;ul class="row unstyled cards col-md-offset-1"&gt;
  &lt;li class="col-lg-4 col-md-5 card" ng-repeat="parameter in parameterList"&gt;
   &lt;label id="sliderLabel"&gt;
    &lt;input type="checkbox" ng-model="parameter.done"&gt;
    &lt;span&gt;{{parameter.text}}&lt;/span&gt;
   &lt;/label&gt;
   &lt;select class="form-control" ng-hide="!parameter.done" ng-disabled="anyNum=='any'" ng-change="GetAllVal()" ng-model="test" disabled&gt;
    &lt;option ng-repeat="n in range(1,100)"&gt;{{n}}&lt;/option&gt;
   &lt;/select&gt;
    &lt;h4 id="{{parameter.id+test}}"&gt;{{parameter.id+test}}&lt;/h4&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>