Skip to content

Instantly share code, notes, and snippets.

@erkobridee
Created July 26, 2012 14:46
Show Gist options
  • Save erkobridee/3182467 to your computer and use it in GitHub Desktop.
Save erkobridee/3182467 to your computer and use it in GitHub Desktop.
AngularJS DI
// automatic DI from AngularJS
function Ctrl1($scope) {
//... code ...
}
function Ctrl2(scopeCustomName) {
//... code ...
}
Ctrl2.$inject = ['$scope'];
/*
for more informations about AngularJS DI, see:
http://code.angularjs.org/1.0.1/docs-1.0.1/api/AUTO.$injector
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment