Skip to content

Instantly share code, notes, and snippets.

@cliffmeyers
Created April 21, 2013 15:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save cliffmeyers/3d1db5373313938c3b87 to your computer and use it in GitHub Desktop.
Save cliffmeyers/3d1db5373313938c3b87 to your computer and use it in GitHub Desktop.
Sample user module.
var userModule = angular.module('userModule',[]);
userModule.factory('userService', ['$http', function($http) {
return new UserService($http);
}]);
userModule.factory('userModel', ['userService', function(userService) {
return new UserModel(userService);
}]);
userModule.controller('loginController', ['$scope', 'userModel', LoginController]);
userModule.controller('registrationController', ['$scope', 'userModel', RegistrationController]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment