Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sparrow/12e3fbe8b43da4613349ce3f6e9498c1 to your computer and use it in GitHub Desktop.
Save sparrow/12e3fbe8b43da4613349ce3f6e9498c1 to your computer and use it in GitHub Desktop.
This is an AngularJS code snippet that we used for our blog post https://rubygarage.org/blog/react-vs-angularjs at RubyGarage. It demonstrates how we inject dependencies in an AngularJS module using an inline array annotation. This code snippet was taken from a well-known TodoMVC application.
[“$scope”, “$routeParams”, “$filter”, “store”, function TodoCtrl(s, r, f, a) { //your code goes here }];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment