title: angular filter $http call information in controller or service
body: <p>I think it is best practice to use a service that returns information of a http call as a promise and these information should be added to the scope in the controller. Like:</p>
  
  <pre><code>awesomeService.getAllInformation().then(data){
    $scope.data = data;
  }
  </code></pre>
  
  <p>Question: If i want to filter the returned information of the http call, do I do this in the controller? or in a separate method in the service? Example in Controller:</p>
  
  <pre><code>awesomeSvc.getAllInformation().then(data){
    angular.forEach(data,function(dataItem, dataIndex){
      if(dataItem === 'foo'){
         $data = dataItem
      }
    }
  }
  </code></pre>
  
  <p>Or do i create a second service that is responsible for manipulation or filtering of the information received by the http call. Like this file structure:</p>
  
  <p>File1: service for all http calls
  File2: service for manipulation of the calls
  File3: controller</p>
  
  <p>So that the awesomeService call would be made in the second service:</p>
  
  <pre><code>function dataManipulationInSecondService(){
    var data = "";
    awesomeService.getAllInformation().then(data){
      angular.forEach(data,function(dataItem, dataIndex){
        if(dataItem === 'foo'){
           data = dataItem
        }
      }
    }
    return data;
  }
  </code></pre>
  
  <p>And then in the controller:</p>
  
  <pre><code>secondService.dataManipulationInSecondService().then(data){
      $scope.data = data;
  }
  </code></pre>
  
  <p>I hope my question is not too confusing and somebody can tell me the best practice ;)</p>
  
  <p>Thanks for your help</p>