title: 0x800a1391 - JavaScript runtime error: 'angular' is undefined
body: <p>my controller.js has the following code:</p>
  
  <pre><code>  var myController = angular.module('myApp.controllers', [])
  </code></pre>
  
  <p>My Services.js has the following code:</p>
  
  <pre><code>  angular.module('myApp.services', [])
  </code></pre>
  
  <p>When I run my application, the code "var myController = angular.module('myApp.controllers', [])" gives me the following exception:
  0x800a1391 - JavaScript runtime error: 'angular' is undefined.</p>
  
  <p>Can anyone please tell me what goes wrong? Your help will be appreciated :)</p>
  
  <p>Btw, here is the html code of my web app</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;PathFinding.js&lt;/title&gt;
      &lt;link rel="stylesheet" href="./css/style.css" /&gt;
      &lt;link rel="stylesheet" href="./lib/themes/jquery.ui.all.css" /&gt;
      &lt;script src="./js/angular.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="path/to/bower_components/pathfinding/pathfinding-browser.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/raphael-min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/es5-shim.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/state-machine.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/async.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.core.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.widget.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.mouse.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.draggable.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.accordion.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/ui/jquery.ui.slider.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./lib/pathfinding-browser.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./js/view.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./js/controller.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./js/Services.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./js/mainApp.js"&gt;&lt;/script&gt;
      
      &lt;script type="text/javascript" src="./js/panel.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="./js/main.js"&gt;&lt;/script&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;ion-modal-view&gt;
          &lt;ion-content&gt;
              &lt;ion-scroll zooming="true" overflow-scroll="false" direction="xy" style="width: 100%; height:100%;"
                          scrollbar-x="false" scrollbar-y="false"&gt;
  
                  &lt;div class="scroll-container" id="draw_area" style="width: 100%; height:100%; background: url('PathFindingMap.png') no-repeat "&gt;
    
                  &lt;/div&gt;
              &lt;/ion-scroll&gt;
          &lt;/ion-content&gt;
      &lt;/ion-modal-view&gt;
  
      &lt;button style="margin-bottom:10px;margin-left:30px;margin-right:30px;" id="button1" class="control_button" type="button"&gt;Search!&lt;/button&gt;
  
      &lt;div style="visibility: hidden;" id="algorithm_panel" class="panel right_panel"&gt;
  
          &lt;div class="accordion"&gt;
  
              &lt;h3 id="astar_header"&gt;&lt;/h3&gt;
  
              &lt;div id="astar_section" class="finder_section"&gt;
  
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div style="visibility: hidden;" id="play_panel" class="panel right_panel"&gt;
  
      &lt;/div&gt;
      &lt;div id="stats"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>