Hi Sander,

I have changed javascript like this Myapp.js

var myapp=new angular.module("myapp",["ngResource"]);
myapp.controller("MainCtrl",["$scope","$resource",function($scope,$resource){
var user=$resource("
http://localhost:8082/RESTJerseyExample/rest/restfultest/GetCarValues";);
$scope.list=function(){
user.query(function(data){
$scope.users=data;
},function(error){
alert(error.data);
});
 };
$scope.list();
}]);

and index.html like this

<!DOCTYPE html>
<html ng-app="myapp">
<head>
<title>Hello AngularJS</title>
<script type="text/javascript" src="
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.13/angular.min.js
"></script>
<script type="text/javascript"
src="js/lib/angular-resource.min.js"></script>
<script type="text/javascript" src="Myapp.js"></script>
</head>

<body>
<div ng-controller="MainCtrl">
<ul>
<li ng-repeat="u in users">
{{u.username}}
</li>
</ul>

</div>
</body>
</html>

I am getting error like this in web page


 Failed to load resource: net::ERR_CONNECTION_REFUSED

Thanks&Regards,
Bhagyasri.T


On Sat, Feb 14, 2015 at 11:58 AM, Sander Elias <[email protected]>
wrote:

> Hi Tripuramallu,
>
> First of all, you are using an ancient (not supported) version. 1.0.8
> dates from 2013. Update to a current version (1.3, or if you are daring 1.4
> beta) and you will have less problems.
> in your case, put in a console.log(data) in your .success call, to verify
> what you are getting back from your server, also add an .error method to
> see if there is an issue resolving.
>
> Regards
> Sander
>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to