title: Uncaught ReferenceError: angular is not defined - AngularJS not working
body: <p>I'm attempting to learn angular and I am struggling with a simple button click.<br>
  I followed an example which has an identical code to the one below.</p>
  
  <p>The result I am looking for is for the button click to cause an alert. However, there is no response to the button click. Does anybody have any ideas? </p>
  
  <pre><code>&lt;html lang="en" ng-app="myApp" &gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;My AngularJS App&lt;/title&gt;
    &lt;link rel="stylesheet" href="css/app.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div &gt;
          &lt;button my-directive&gt;Click Me!&lt;/button&gt;
      &lt;/div&gt;
  
      &lt;script&gt;
          var app = angular.module('myApp',[]);
  
          app.directive('myDirective',function(){
  
              return function(scope, element,attrs) {
                  element.bind('click',function() {alert('click')});
              };
  
          });
      &lt;/script&gt;
  
      &lt;h1&gt;{{2+3}}&lt;/h1&gt;
  
    &lt;!-- In production use:
    &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"&gt;&lt;/script&gt;
    --&gt;
    &lt;script src="lib/angular/angular.js"&gt;&lt;/script&gt;
    &lt;script src="lib/angular/angular-route.js"&gt;&lt;/script&gt;
    &lt;script src="js/app.js"&gt;&lt;/script&gt;
    &lt;script src="js/services.js"&gt;&lt;/script&gt;
    &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
    &lt;script src="js/filters.js"&gt;&lt;/script&gt;
    &lt;script src="js/directives.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>