title: GET angular.js files net::ERR_ABORTED
body: <p>I need your help to find out where's my error. I am using springboot(backend) x Angularjs(frontend). I get a GET (angular.js) files net::ERR_ABORTED when trying to load localhost:8080. I don't find any mistake on my angularfiles either. So here is my codes:</p>
  
  <pre><code>//for the springcontroller
  
  @RestController
  public class EmployeeController {
  
      @Autowired
      EmployeeService es;
  
      @RequestMapping(method=RequestMethod.GET,value="/employees")
      public List&lt;Employee&gt; getAllEmployees(){
          return es.getAllEmployees();
      }
  
      @RequestMapping(method=RequestMethod.GET,value="/employees/{name}")
      public Employee getEmployee(@PathVariable String name){
          return es.getEmployee(name);
      }
  
      @RequestMapping(method=RequestMethod.POST,value="/employees")
      public void addEmployee(@RequestBody Employee emp){
          es.addEmployee(emp);
      }
  
      @RequestMapping(method=RequestMethod.PUT,value="/employees/{name}")
      public void updateEmployee(@RequestBody Employee emp,@PathVariable String name){
          es.updateEmployee(emp,name);
      }
  
      @RequestMapping(method=RequestMethod.DELETE,value="/employees/{name}")
      public void deleteEmployee(@PathVariable String name){
          es.deleteEmployee(name);
      }
  }
  </code></pre>
  
  <p>For my app.js:</p>
  
  <pre><code>(function(){
      'use strict';
      var app = angular.module('myApp',['ngRoute','myApp.controller']);
  
      app.config(function($routeProvider) {
          $routeProvider
          .when('/', {
              templateUrl: 'index.html',
              controller: 'HomeController'
          });
      });
  
  })();
  </code></pre>
  
  <p>For my HomeController.js</p>
  
  <pre><code>var module = angular.module('myApp.controller',['myApp.service']);
  module.controller('HomeController',['$scope','HomeService',
      function($scope,HomeService){
          $scope.EmpData = [];
  
          var onSuccess = function(response){
              $scope.EmpData = response.data;
          };
  
          var onError = function(error){
              console.log('Error fetching data...');
          };
  
          function getAllEmployees(){
              HomeService.getAllEmployees().then(onSuccess,onError)
          };
     } //end of function
  
  ]);
  </code></pre>
  
  <p>For my HomeService.js</p>
  
  <pre><code>var module = angular.module('myApp.service',[]);
  module.service('HomeService',['$http',function($http){
          function doFetchEmployees(){
              var response = $http.get("/employees");
              return response;
          };
          return{
             getAllEmployees : function(){
                 return doFetchEmployees();
          }
      };
  
      }]);
  </code></pre>
  
  <p>And finally for my index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
      &lt;script src="src/main/resources/scripts/angular.min.js"&gt;&lt;/script&gt;
      &lt;script src ="src/main/resources/scripts/angular-route.min.js"&gt;&lt;/script&gt;
      &lt;script src="src/main/resources/app.js"&gt;&lt;/script&gt;
      &lt;script src = "src/main/resources/HomeController.js"&gt;&lt;/script&gt;
      &lt;script src ="src/main/resources/HomeService.js" &gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body ng-app="myApp" ng-controller="HomeController"&gt;
      &lt;h2&gt;Home&lt;/h2&gt;
      &lt;br/&gt;
      &lt;a href="#/index.html"&gt;Home&lt;/a&gt;
      &lt;br/&gt;
      &lt;table&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Email&lt;/th&gt;
          &lt;th&gt;Address&lt;/th&gt;
          &lt;th&gt;telephone&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody ng-repeat="emp in EmpData"&gt;
          &lt;tr&gt;
          &lt;td&gt;{{emp.name}}&lt;/td&gt;
          &lt;td&gt;{{emp.email}}&lt;/td&gt;
          &lt;td&gt;{{emp.address}}&lt;/td&gt;
          &lt;td&gt;{{emp.telephone}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
  
      &lt;br/&gt;
      &lt;a href="http://localhost:8080/adduser.html"&gt;Create User&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And here are all my error message:</p>
  
  <pre><code>GET http://localhost:8080/src/main/resources/scripts/angular-route.min.js net::ERR_ABORTED
  localhost/:7 GET http://localhost:8080/src/main/resources/app.js net::ERR_ABORTED
  localhost/:5 GET http://localhost:8080/src/main/resources/scripts/angular.min.js net::ERR_ABORTED
  localhost/:8 GET http://localhost:8080/src/main/resources/HomeController.js net::ERR_ABORTED
  localhost/:9 GET http://localhost:8080/src/main/resources/HomeService.js net::ERR_ABORTED
  localhost/:6 GET http://localhost:8080/src/main/resources/scripts/angular-route.min.js net::ERR_ABORTED
  localhost/:7 GET http://localhost:8080/src/main/resources/app.js net::ERR_ABORTED
  localhost/:8 GET http://localhost:8080/src/main/resources/HomeController.js net::ERR_ABORTED
  localhost/:9 GET http://localhost:8080/src/main/resources/HomeService.js net::ERR_ABORTED
  </code></pre>
  
  <p>My index.html has no output just {{emp.names}} -> like this.
  I already tried putting the script tags inside the body but still the same. Hard cache reload &amp; clear. still no luck.
  And Lastly when i try access localhost:8080 my eclipse console logs shows these 3 lines, is this also some cause of the error?</p>
  
  <pre><code>2017-10-18 10:31:22.115  INFO 9176 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
  2017-10-18 10:31:22.115  INFO 9176 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
  2017-10-18 10:31:22.127  INFO 9176 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 12 ms
  </code></pre>
  
  <p>I'm having a hard time trying to figure this out.</p>
  
  <p><a href="https://i.stack.imgur.com/Qs1LP.png" rel="noreferrer">enter image description here</a></p>