title: Angular js module won't load
body: <p>I get always the following error in angular js when I add <code>ng-app="adminApp"</code> to the body. The error is thrown during auto bootstrap.</p>
  
  <blockquote>
    <p>Uncaught Error: [$injector:modulerr] Failed to instantiate module adminApp due to:
    Error: [$injector:nomod] Module 'adminApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.</p>
  </blockquote>
  
  <p>If I change it to only <code>ng-app</code> the error won't show up but i can't use <code>ngRoute</code> as it needs the app to be given a name. I read lots of solutions for this problem last 2 days but i found none of them working for me.</p>
  
  <p>I removed everything and still won't work. I left only the ng-app and 3 elements.</p>
  
  <p>index.html:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="true">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.mainmodule = angular.module('adminApp', ['ngRoute','ngMaterial']);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="hu"&gt;
   &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;meta name="viewport" content="initial-scale=1" /&gt;
   &lt;/head&gt;
   &lt;body ng-app="adminApp"&gt;
    &lt;div id="loadingscreen"&gt;
     &lt;div style="left:0;top:0;width:0px;height:20px;background-color:#0000FF;" id="loadingbar"&gt;&lt;/div&gt;
     &lt;div class="center"&gt;Loading...&lt;/div&gt;
    &lt;/div&gt;
    &lt;script type="text/javascript" src="utils/angular.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="utils/angular-route.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="utils/angular-animate.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="utils/angular-aria.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="utils/angular-material.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="utils/require.js" data-main="modules/main"&gt;&lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>EDIT: I use angular v1.5.0-rc.0.</p>
  
  <p>Codepen: <a href="http://codepen.io/anon/pen/pgwZLq" rel="nofollow">http://codepen.io/anon/pen/pgwZLq</a></p>