title: $digest already in progress
body: <p>I'm fetching the data using $http.get() and passing it as argument to a custom filter to get the filterd data. But it is giving an 
  error: <strong>$digest already in progress</strong>.</p>
  
  <p>Does anyone know how to avoid this error or achieve the same thing but a different way?
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var map=angular.module('map', [])
  .controller('mapCtrl', function ($scope,$filter,$http) {
   $http.get('./json/integrated.json').success(function(data) {
       $scope.sitesInfo = data;
     });
   var filteritems= $filter('applySfotwareFilter')($scope.sitesInfo);
    
    });</code></pre>
  </div>
  </div>
  </p>