Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created December 16, 2016 22:48
Show Gist options
  • Select an option

  • Save javaeeeee/a88957503b45fac4e27a8e9ca6774219 to your computer and use it in GitHub Desktop.

Select an option

Save javaeeeee/a88957503b45fac4e27a8e9ca6774219 to your computer and use it in GitHub Desktop.
Using $inject to manually identify the dependencies for an AngularJS component
angular.module('app', [])
.controller('HelloController', HelloController);
HelloController.$inject = ['$scope'];
function HelloController($scope) {
$scope.myModel = 'World';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment