Skip to content

Instantly share code, notes, and snippets.

@drphrozen
Created November 6, 2012 08:12
Show Gist options
  • Save drphrozen/4023426 to your computer and use it in GitHub Desktop.
Save drphrozen/4023426 to your computer and use it in GitHub Desktop.
AngularJS minification
angular.module('SampleModule', [])
.factory('SampleService', ['$resource', function(resource) {
// ...
})
.controller('SampleController', ['$scope', '$resource', function(scope, resource) {
// ...
});
// Alternative notation using $inject:
angular.module('OtherModule', []);
var OtherController = function(scope, resource) {
// ...
};
OtherController.$inject = ['$scope', '$inject'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment