title: AngularJS not recognizing controller
body: <p>So I already know when I see the answer I'm going to feel really dumb, but I'm working through the AngularJS tutorials at egghead.io. When I do this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;AngularJS Tutorials&lt;/title&gt;
          &lt;link rel="stylesheet" href="/foundation/stylesheets/foundation.min.css"&gt;
          &lt;script src="js/main.js"&gt;&lt;/script&gt;
          &lt;script src="lib/angular/angular.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div ng-app="myApp"&gt;
  
              &lt;div ng-controller="FirstCtrl"&gt;
                  &lt;input type="text" ng-model="data.message"&gt;
                  &lt;h1&gt;{{ data.message }}&lt;/h1&gt;
              &lt;/div&gt;
  
              &lt;div ng-controller="SecondCtrl"&gt;
                  &lt;input type="text" ng-model="data.message"&gt;
                  &lt;h1&gt;{{ data.message }}&lt;/h1&gt;
              &lt;/div&gt;
          &lt;/div&gt;  
  &lt;/html&gt;
  </code></pre>
  
  <p>with my JavaScript file as so (named main.js):</p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  myApp.factory('Data', function() {
      return { message: "I'm data from a service"}
  })
  
  function FirstCtrl($scope, Data) {
      $scope.data = Data;
  }
  
  function SecondCtrl($scope, Data) {
      $scope.data = Data;
  }
  </code></pre>
  
  <p>My <code>{{ data.message }}</code> isn't recognized as an AngularJS binding (i.e. in the page it shows up as 
  <br> <code>{{ data.message }}</code> instead of <code>"I'm data from a service"</code>). But if I take all the JS code and put it into <code>&lt;script&gt;&lt;/script&gt;</code> tags directly in the HTML it works fine. Am I missing a reference or something? Haven't seemed to find this anywhere, likely because it's really basic.</p>