title: Uncaught Error: [$injector:modulerr] & Uncaught ReferenceError: app is not defined
body: <p>I am using AngularJS 1.3.5 and I am trying to get an information from a json file.
  Here is my code:
  The HTML file:
  <div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/controllers/MainController.js"&gt;&lt;/script&gt;
  &lt;script src="js/services/myapp.js"&gt;&lt;/script&gt;
  &lt;script src="js/app.js"&gt;&lt;/script&gt;
  &lt;body ng-app="app"&gt;
  
  &lt;div ng-controller="MainController"&gt;
  
              
                  &lt;div ng-repeat="content in contents"&gt;
     
  
  &lt;a ng-href="{{data.FolderPath}}"&gt;{{data.FolderPath}}&lt;/a&gt;
                  
       
                      
                  &lt;/div&gt;
              
         
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Javascript files:
  MainController.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>app.controller('MainController', ['$scope', 'myapp', function($scope, myapp) {
    myapp.success(function(data) {
      $scope.FolderPath = data;
    });
  }]);</code></pre>
  </div>
  </div>
  </p>
  
  <p>myapp.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>app.factory('myapp', ['$http', function($http) { 
    return $http.get('C:\Users\nouri\Desktop\configFile.json') 
              .success(function(data) { 
                return data; 
              }) 
              .error(function(err) { 
                return err; 
              }); 
  }]);</code></pre>
  </div>
  </div>
  </p>
  
  <p>and finally app.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var app = angular.module('FolderApp', []);</code></pre>
  </div>
  </div>
  
  I corrected the errors hwoever now I am having a white screen so my code didn't read what is in my json file:
      {
        "FolderPath": "C:\Users\nouri\Desktop\test" 
      }
  what should I do<a href="https://i.stack.imgur.com/wWBx7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wWBx7.png" alt="enter image description here"></a></p>