title: Angular = getting invalid array length
body: <p>I have the following function in my controller...</p>
  
  <pre><code>$scope.pagerPages = function (n) {
      var i = Math.ceil(n);
      return new Array(i);
  }
  </code></pre>
  
  <p>the <code>n</code> comes from an expression on the view, and can sometimes be a fraction. Which is why I've done <code>Math.ceil</code> on <code>n</code>.</p>
  
  <p>Anyone know why I would be getting this error?</p>
  
  <blockquote>
    <p>Invalid array length</p>
  </blockquote>
  
  <p>EDIT;
  <code>n</code> is a calculation from the view </p>
  
  <pre><code>&lt;div ng-repeat="i in pagerPages( report.TotalNumRows / report.View.PageSize ) track by $index"&gt;
  ...
  &lt;/div&gt;
  </code></pre>
  
  <p>the calculation results in 11.2, which is evidentally working, as on the page i get 12 iterations of the div element, yet it's generating this error?</p>