title: AngularJS: $rootScope:infdig error when calling a ng-style function inside ng-repeat
body: <p>I'm trying to build an animation on some phrases that will be displayed on the site main page, in a random position and with fade and translate effects.</p>
  
  <p>I would achieve this using <strong>ng-style</strong> attribute <em>inside an ng-repeat</em> attribute and setting the ng-style value calling a JavaScript function defined inside the HomeController.</p>
  
  <p>Using this approch cause angular to throw the exception: <em>$rootScope:infdig error 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations</em></p>
  
  <p>I read so much about this but no solution has solved my case. 
  Anyone could help me?</p>
  
  <p>Here is a part of index.html:</p>
  
  <pre><code>&lt;div class="phrasesContainer" animate-phrases=""&gt;
        &lt;h3 class="flying-text" ng-repeat="phrase in Phrases" ng-style="getTopLeftPosition()"&gt;{{phrase}}&lt;/h3&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Here is the controller function:</p>
  
  <pre><code>$scope.getTopLeftPosition = function() {
  var top = randomBetween(10, 90);
  var left = getRandomTwoRange(5, 30, 70, 80);
  
  return {
    top: top + '%',
    left: left + '%'
  };
  </code></pre>
  
  <p>}</p>
  
  <p>Here is a demo: <a href="http://plnkr.co/edit/8sYks589agtLbZCGJ08B?p=preview">http://plnkr.co/edit/8sYks589agtLbZCGJ08B?p=preview</a></p>