In this line you are creating a module myApp
while injectcing angularStart.services
var appRoot = angular.module('myApp', ['angularStart.services']);
In this line you are trying to create a module `angularStart.services while injecting nothing
var angularStartServices = angular.module('angularStart.services');
The second one should be:
var angularStartServices = angular.module('angularStart.services', []);
if you pass one parameter to angular.module it is a get reference to a module function if you pass two it is a module creation call
Other things I found:
- must inject
ngResource
into yourappRoot
module - and in order to inject
ngResource
you must include a reference to theangular-resource
js file $rootscope
should be$rootScope
I updated your fiddle w/ these chnage