title: How can i do an ng-repeat by a given select option value
body: <p>So my problem is as follows, i have this HTML</p>
  
  <pre><code>        &lt;div class="col-sm-4"&gt;
              &lt;p&gt;&lt;span&gt;Teste A/B:&lt;/span&gt;&lt;/p&gt;
              &lt;label class="label-radio"&gt;
                  &lt;input type="radio" class="radio" name="ab-test" value="true" ng-model="isTestAvailable"&gt; Sim &lt;/label&gt;
              &lt;label class="label-radio"&gt;
                  &lt;input type="radio" class="radio" name="ab-test" value="false" ng-model="isTestAvailable"&gt; Não &lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="col-sm-4"&gt;
              &lt;p&gt;&lt;span&gt;Nº de testes:&lt;/span&gt;&lt;/p&gt;
              &lt;select class="form-control" ng-model="tests.number"&gt;
                  &lt;option value="1"&gt;1&lt;/option&gt;
                  &lt;option value="2"&gt;2&lt;/option&gt;
                  &lt;option value="3"&gt;3&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>What i'm trying to do is make it so that when the user changes the select to another value i generate the given amount of test inputs via ng-repeat</p>
  
  <pre><code>    &lt;div ng-if="isTestAvailable == 'true'" ng-repeat="test in tests"&gt;
          &lt;hr&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;h3&gt;Test {{$index}}&lt;/h3&gt;
                  &lt;p&gt;&lt;span&gt;Specifications:&lt;/span&gt;&lt;/p&gt;
                  &lt;textarea id="teste1" class="form-control" onkeyup="resizeTextarea('test1')" data-resizable="true"&gt;&lt;/textarea&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;hr&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>My controller contains this $watch</p>
  
  <pre><code>$scope.$watch("tests.number", function(newVal, oldVal) {
      $scope.tests = [{}];
      var i = parseInt(newVal);
      for(var x = i; x &lt;= newVal; x++) {
          $scope.tests.push({});
      }
  });
  </code></pre>
  
  <p>that i tried to use in order to change the amount of test objects when the value changes, i tried using a simple variable as well and doing <code>ng-repeat("i in tests.number")</code> instead but that didn't work, what can i do so that the ng-repeat works with my given select option value?</p>