Error when call angular $http - "Provider must return a value from $get factory method."
<p>i'm using ionic framework for mobile apps which work with angular js ..
i had error when calling ajax data (factory,controller) ..</p>

<p>when reload it gives me this error "Provider 'stations' must return a value from $get factory method." </p>

<p>some of code :  </p>

<pre><code>enter cod  //services.js
angular.module('starter.services', [])

.factory('stations',['$http',function($http){ 
var stations = [];               $http.get(base_url+'api/stations/uid/'+uu_id).success(function(response){
            stations = response;     
            return stations;
      });  
}])
//controllers.js
.controller('HomeCtrl',['$scope', 'stations', function($scope,stations){ 
    $scope.stations = [];    
    stations.success(function(data){ 
        $scope.stations = data;
    });     
}])e here
</code></pre>

<p>thanks for help :) ....</p>