I guess the $http.get part is not working .
Here is my code :
.controller('home', function($scope, request){
$scope.list = request.get(baseUrl);
})
.factory('request', function($http){
var get = function(url){
$http.get(url).success(function(data){
console.log(data);
return data; //returns nothing
});
}
return {
get : get
}
});
function(data, status, headers, config)and then print each argument to the console and let's know the output.