title: AngularJS : service not returning value
body: <p>I'm trying to write an Angular service and it seems like there is something missing. My problem is its not returning any value to my Angular controller</p>
  
  <p><code>getPrepTimes()</code> method is not returning the http data</p>
  
  <p>But when I check the network (via Chrome dev tools) it will correctly call the external api and return a json object as a response</p>
  
  <pre><code>#my service
  'use strict';
  angular.module('recipeapp')
    .service('prepTimeService',['$http', function($http){
        this.prepTime = getPrepTimes();
  
        function getPrepTimes(){
            $http({
              url: '/prep_times/index.json',
              method: 'GET'
            })
            .success(function (data, status, header, config){
              return data;
            });
        };
    }
    ]);
  
  
  
  
  #controller
  'use strict';
  
  angular.module('recipeapp')
    .controller('recipeCtrl', ['$scope', 'prepTimeService', function($scope, prepTimeService){
       $scope.prep_time = prepTimeService.prepTime;
    }]);
  </code></pre>
  
  <p>When I checked the method <code>getPrepTimes()</code> with returning a string it works. What could be missing here?</p>