Currently, I am delving into Angular and am keen on creating a web application that consumes a Restful Web service. The setup of my page is as follows:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html ng-app="Tripeew">
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tripeew</title>
</head>
<body ng-controller="region">
<h1>Hello World !!</h1>
<p>Id : {{All.id}}</p>
<p>Nom :{{All.nom}}</p>
<br/>
<script type="text/javascript">
var myapp = angular.module('Tripeew',[]);
myapp.controller('region',function($scope,$http){
$http.get('http://localhost:9090/Tripeew_V1.0/webresources/tripeewws.regions/3').succes(function(){
$scope.All = response.data ;
});
});
</script>
</body>
</html>
Unfortunately, despite the function of the ws through the URL, I am unable to display the result. Instead, all I see is this:
Hello World !!
Id : {{All.id}}
Nom :{{All.nom}}