Skip to content

Instantly share code, notes, and snippets.

@rachtsingh
Created May 26, 2015 18:14
Show Gist options
  • Save rachtsingh/65944f9c536c4af63fcb to your computer and use it in GitHub Desktop.
Save rachtsingh/65944f9c536c4af63fcb to your computer and use it in GitHub Desktop.
Basic structure
angular.module('index.controllers', [])
.controller('Ctrl', ['$scope', '$http', 'Service', function($scope, $http, Service){
}]);
angular.module('index.services')
.factory('Service', [function(){
var Service = {
stuff: 'here'
};
return Service;
}]);
angular.module('index', [
'index.controllers',
'index.services',
]).config(['$routeProvider', '$http', 'Service', function($routeProvider, $http, Service){
// do stuff here
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment