title: AngularJS error: [ng:areq] Argument 'TestController' is not a function, got undefined
body: <p>I'm trying to make my first controller and getting this error:</p>
  
  <p><em>Error: [ng:areq] Argument 'TestController' is not a function, got undefined</em></p>
  
  <p>I've simplified my code to find the error but no luck. It looks to my like I'm creating the controller and the books array in the script and referencing the controller letter by letter in the div. What am I missing?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html data-ng-app&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div data-ng-controller="TestController"&gt;
          &lt;ul&gt;
              &lt;li data-ng-repeat="b in books"&gt;{{ b.title + ' by ' + b.author }}&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  
      &lt;script src="angular.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          function TestController() {
              this.books = [{title: 'Angela', author: 'Donald Duck'}, {title: 'Angles', author: 'Dirty Harry'}];
          }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>