I have the following project, quite simple, that consumes the following JSON object obtained from a local web service.
{"nombre":"Miguel","id":1,"profesion":"Desarrollador"}
My app.js is like this:
$(document).ready(function(){
$.ajax({
url: "http://localhost:8080/RESTfulApp/rest/lista/verificar"
}).then(function(data){
$('verificar-nombre').append(data.nombre);
$('verificar-id').append(data.id);
$('verificar-profesion').append(data.profesion);
});
});
And the index like this:
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="ISO-8859-1">
<title>Prueba Angular</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="src/main/webapp/js/app.js"></script>
</head>
<body>
<div>
<p class="verificar-nombre">Nombre</p>
<p class="verificar-id">ID</p>
<p class="verificar-profesion">Profesion</p>
</div>
</body>
</html>
When executing the project, the chrome console returns error 404 with the following information:
The structure of my project is as follows and so you can see this all correctly, any idea why the index does not find my app.js?