Hi raju,

          I have used javascript as

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){
console.log(data);
$scope.users=data;
},function(error){
alert(error.data);
});
 };
$scope.list();
}]);

and I have changed the angular-resource.min.js file, I used latest
version,... previously I used 1.0.7, I have changed to 1.3.13

and my html file is

<!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="
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.13/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>

On Tue, Feb 17, 2015 at 4:50 PM, raju reddy <[email protected]> wrote:

>
> Hi Tripuramallu,
>
>
> Can you please tell me how u did.Iam facing same issue.
>
> Thanks,
> Raju
>
>
>>
>>
>>
>> On Tue, Feb 17, 2015 at 3:23 PM, Tripuramallu Bhagyasri <
>> [email protected]> wrote:
>>
>>> Hi Sander,
>>>
>>>         Still I am getting same error GET http://localhost/
>>> RESTJerseyExample/rest/restfultest/GetCarValues
>>> net::ERR_CONNECTION_REFUSED
>>>
>>> like this how to enable CORS on site
>>>
>>> Thanks&Regards
>>>
>>> On Mon, Feb 16, 2015 at 6:08 PM, Sander Elias <[email protected]>
>>> wrote:
>>>
>>>> hi Tripuramallu,
>>>>
>>>> If you follow the link in my previous message, there is a lot of
>>>> information about CORS on that site.
>>>> The really short explanations, its a security measure to make sure you
>>>> can't request stuff you are not supposed to.
>>>>
>>>> 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.
>

-- 
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