The $inject attribute is needed when a module has dependencies and you minify JS code. For e.g. function(Proposal, $route) will be minified to function(a, b), but your module name is Proposal and angular's module name is $route. The dependency injection in angular works based on the arguments' names. Hence the need to set $inject with the names of the modules you depend on. If you want to learn more there are a few excellent introductory videos on youtube: http://www.youtube.com/user/angularjs/videos