title: AngularJS error: 'argument 'FirstCtrl' is not a function, got undefined'
body: <p>I noticed the same question was asked a few times here, I tried so solve it but nothing helps. </p>
  
  <p>I'm following this tutorial with the egghead videos.</p>
  
  <p>But when I get at the section of Controllers and Sharing data between controllers, I can't get it to work.</p>
  
  <p>When I run it with Chrome, I get this error in the console: </p>
  
  <blockquote>
    <p>'argument 'FirstCtrl' is not a function, got undefined'. </p>
  </blockquote>
  
  <p>I really don't know what's wrong. The code is the same from in the tutorial.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app&gt;
   &lt;head&gt;
      &lt;title&gt;AngularJS Tutorials: Controllers&lt;/title&gt;
      &lt;link rel="stylesheet" href="mystyle.css"&gt;
      &lt;script src="http://code.angularjs.org/1.2.0-rc.2/angular.min.js"&gt;&lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;div ng-app=""&gt;
         &lt;div ng-controller="FirstCtrl"&gt;   
             &lt;h1&gt; {{data.message + " world"}}&lt;/h1&gt;
  
             &lt;div class="{{data.message}}"&gt;
                 Wrap me in a foundation component
             &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript" src="main.js"&gt;&lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>function FirstCtrl($scope){
     $scope.data = { message: "Hello" };
  } 
  </code></pre>