title: AngularJS For Loop with Numbers & Ranges
body: <p>Angular does provide some support for a for loop using numbers within its HTML directives:</p>
  
  <pre><code>&lt;div data-ng-repeat="i in [1,2,3,4,5]"&gt;
    do something
  &lt;/div&gt;
  </code></pre>
  
  <p>But if your scope variable includes a range that has a dynamic number then you will need to create an empty array each time.</p>
  
  <p>In the controller</p>
  
  <pre><code>var range = [];
  for(var i=0;i&lt;total;i++) {
    range.push(i);
  }
  $scope.range = range;
  </code></pre>
  
  <p>In the HTML</p>
  
  <pre><code>&lt;div data-ng-repeat="i in range"&gt;
    do something
  &lt;/div&gt;
  </code></pre>
  
  <p>This works, but it is unnecessary since we won't be using the range array at all within the loop. Does anyone know of setting a range or a regular for min/max value? </p>
  
  <p>Something like:</p>
  
  <pre><code>&lt;div data-ng-repeat="i in 1 .. 100"&gt;
    do something
  &lt;/div&gt;
  </code></pre>