title: Why is the function in angular's DI inline annotation a array element?
body: <p>I have a question for the angularjs folks here. </p>
  
  <p>So, I am using angular for quite a while now. However, every time when I am writing a new Controller or something that is using dependency injection, I find myself miswriting the the inline definition. </p>
  
  <pre><code>someModule.controller('MyController', ['dep1', 'dep2', function (dep1, dep2) {
    ...
  }]);
  </code></pre>
  
  <p>I understand how it works, but why did the angular guys not decide for a more common approach? For example the requirejs way</p>
  
  <pre><code>someModule.controller('MyController', ['dep1', 'dep2'], function(dep1, dep2) {
    ...
  });
  </code></pre>
  
  <p>What is bothering me, is that the second argument is a array of dependencies <strong>and</strong> the callback as the last element at the same time. In fact, the whole module code is written in the last array element. </p>
  
  <p>Wouldn't it be better to have the dependencies in an extra array? This way we could easily pass a array of dependencies dynamically into a definition. </p>
  
  <p>I find this rather awkward but never really thought about the reason behind. Can someone explain this to me? </p>