title: Uncaught Error: [$injector:modulerr] Failed to instantiate module error on Angular.js App on Apache
body: <p>I'm using Apache server to host an angular app.
  This is the index.html:</p>
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script src=&quot;/lib/angular/angular.js&quot;&gt;
    &lt;/head&gt;
    &lt;script&gt;
       myapp = angular.module('myapp', []);
       
       myapp.controller('indexCtrl', function($scope){
      
            $scope.words = ['It','is','what','it','is']
       });
      
    &lt;/script&gt;
    
    &lt;body ng-app=&quot;myapp&quot;&gt;
  
        &lt;div ng-controller=&quot;indexCtrl&quot;&gt;
          &lt;div ng-repeat=&quot;word in words&quot;&gt;
            {{word}}
          &lt;/div&gt;
        &lt;/div&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
     
  </code></pre>
  <p>When I hit the html from the browser, it shows a blank page with this error :</p>
  <blockquote>
  <p>Uncaught Error: [$injector:modulerr] Failed to instantiate module myapp due to: Error: [$injector:nomod] Module 'myapp' is not available!</p>
  <p>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>What could be wrong?</p>