title: Argument 'MainController' is not a function, got undefined in AngularJS
body: <p>Here is my HTML and JS File</p>
  
  <p>HTML file </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app=""&gt;
  
  &lt;head&gt;
    &lt;!--Works with latest Stable Build--&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"&gt;&lt;/script&gt;
  
    &lt;!--Does not work with Latest Beta--&gt;
    &lt;!--UNCOMMENT ME! &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.18/angular.min.js"&gt;&lt;/script&gt;--&gt;
  
  
    &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body ng-controller="MainController"&gt;
    &lt;h1&gt;Angular Playground&lt;/h1&gt;
    {{message}}
    &lt;br /&gt;Total Length: {{message.length}}
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>JAVASCRIPT FILE</p>
  
  <pre><code>var MainController = function($scope) {
      $scope.message = "Hello, Michael";
  };
  </code></pre>
  
  <p>If I use the latest stable build, then I get the following result (which is obviously correct): </p>
  
  <blockquote>
    <p>Angular Playground</p>
    
    <p>Hello, Michael  Total Length: 14</p>
  </blockquote>
  
  <p>However, if I use Beta 18, then I get the following error: </p>
  
  <blockquote>
    <p>Error: [ng:areq] Argument 'MainController' is not a function, got undefined</p>
  </blockquote>
  
  <p>and the page returns the following: </p>
  
  <blockquote>
    <p>Angular Playground #2</p>
    
    <p>{{message}}  Total Length: {{message.length}}</p>
  </blockquote>
  
  <p>Any idea, what could be causing this? </p>