title: In angular modules why the body is the last array element?
body: <p>This is more of an architectural question.</p>
  
  <p>One of the most common forms of defining an angular module is this:</p>
  
  <pre><code>angular.module('app', [])
    .controller('Ctrl', ['$scope', function Ctrl($scope) {
      //body...
  }]);
  </code></pre>
  
  <p>But I don't find the syntax very intuitive. How about having the list of dependencies in an array like <a href="http://requirejs.org/docs/api.html#define" rel="nofollow">AMD</a>:</p>
  
  <pre><code>angular.module('app', [])
    .controller('Ctrl', ['$scope'],
            function Ctrl($scope) {
              //body...
            });
  </code></pre>
  
  <p>This way the whole array will contain only string elements each of which refers to a module. The array matches the function parameters one by one. (kinda like <code>arguments</code>).</p>
  
  <p>So my question is why Angular designers went for this convention?</p>