(function(){
var AuthService = function($resource){
var getUsers = function(){
return $resource('http://api.local/users', {}, {
query: { method: 'GET', isArray: true },
create: { method: 'POST' }
})
};
return {
getUsers: getUsers,
};
};
// assigns the service/factory to the githubviewer
var module = angular.module('githubViewer');
module.provider('AuthService', {$get:AuthService});
// console.log(module.provider('Auth', {$get:Auth}),'here');
//end of ify
}());
//////////////////////////////////////// CONTROLLER HERE BELOW
$scope.getUsers = function(){
var user = AuthService.getUsers.query();
console.log(user);
}