title: How to use a variable inside the ng-repeat?
body: <p>I'm using the <code>ng-repeat</code> to list all the products, and I want to print out a star symbol <code>x</code> times depending on the <code>product.rating</code>. So, the code looks like following:</p>
  
  <pre><code>&lt;p class="bs-rating"&gt;&lt;i class="fa fa-star" ng-repeat="i in getRating({{ product.rating }}) track by $index"&gt;&lt;/i&gt;&lt;/p&gt; 
  </code></pre>
  
  <p>However, it parsed the <code>product.rating</code> as a <code>String</code>: <code>Error: [$parse:syntax] http://errors.angularjs.org/1.3.0-beta.8/$parse/syntax?p0=product.rating&amp;p1=is</code></p>
  
  <p>I have tried to remove the curly brackets, <code>{{ }}</code>:</p>
  
  <pre><code>&lt;p class="bs-rating"&gt;&lt;i class="fa fa-star" ng-repeat="i in getRating(product.rating) track by $index"&gt;&lt;/i&gt;&lt;/p&gt; 
  </code></pre>
  
  <p>It gave me <code>undefined</code>. My <code>getRating()</code> is declared as following:</p>
  
  <pre><code>$scope.getRating = function(rating){
      return new Array(parseInt(rating));
  }
  </code></pre>
  
  <p>Could you help me figure it out how to pass a variable to <code>ng</code> tag? </p>