title: Executing function in ng-repeat give error
body: <p>I have to run a function during a ng-repeat like this</p>
  
  <pre><code>&lt;tr ng-repeat="x in listaService track by $index"&gt;
     &lt;td&gt;{{x.label}}&lt;/td&gt;
     &lt;td&gt;&lt;span ng-show="showNoRole(x.label)" id="bannerRole"&gt;Nessun Ruolo&lt;/span&gt; &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and in the angular controller I have this function for control the ng-show:</p>
  
  <pre><code>$scope.showNoRole = function(label) {
     RicercaRuoloService.load(label).then(function(data) {
  
        if (data != "\"null\"") {
           return false;
        } else {
           return true;
  
        }
     }, function(error) {
        $scope.ErroreConnessione = true;
     })
  }
  </code></pre>
  
  <p>the function <code>RicercaRuoloService</code>returns an array or <code>"\"null\""</code>if the array is empty.
  The problem is when I go to the page where is the ng-repeat the console start to print as loop this error:</p>
  
  <pre><code>angular.min.js:107 Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.8/$rootScope/infdig?p0=10&amp;p1=%5B%5D
      at angular.min.js:6
      at r.$digest (angular.min.js:131)
      at r.$apply (angular.min.js:134)
      at g (angular.min.js:87)
      at T (angular.min.js:92)
      at XMLHttpRequest.w.onload (angular.min.js:93)
  </code></pre>
  
  <p>and the cpu usage go frof 20% to 100% until I close the page.
  How can I fix this problem?
  Best reguards</p>
  
  <p>EDIT:
  this is the array from listaService:</p>
  
  <pre><code>[{"_id":"test","label":"test","descrizione":"descrizione test","url":"http://www.virgilio.it","tipoProfilo":"NGPFNL","periodoValidazione":370,"direct":false,"preValid":false,"deleted":false},{"_id":"test2","label":"test2","descrizione":"descr test2","url":"http://www.google.com","tipoProfilo":"NGPFNL","periodoValidazione":123,"direct":false,"preValid":false,"deleted":false}]
  </code></pre>
  
  <p>EDIT2:
  RicercaRuoloService is just an Angular service that call a rest service and take data form db. The rest service works great 'couse I used it for other page too but never as a function in a ng-repeat.</p>