To put it simply angular services always confuse me and I seem to get them working by trial and error. I'd like to know why in this case data returns undefined. 

App module :

```
var app = angular.module('myApp', ['services']);

```

Service:

```
//creating a service module
var appServices = angular.module('services', []);

appServices.factory('Data', function(){
return {message : "I am data"}
});

```

Controller:

```
app.controller('firstCtrl',['Data',
function($scope, Data){
    //get data from the service
    $scope.data = Data;
    console.log(Data);

}]);

app.controller('secondCtrl',['Data',
function($scope, Data){
    //get data from the service
    $scope.data = Data;

}]);

```

If I console log data I just get "undefined" .
Im just trying to do a simple example to return the object {message:"i am data"} 
so that 

$scope.data = Data;

then in the view 

data.message = "i am data"

Would really appreciate an explanation of why this does not work. Thanks