Just curious, but why is this a problem? Also, angular.(to|from)Json handle 
this case for you by taking out $-prefixed properties.

On Tuesday, December 17, 2013 7:58:29 PM UTC-8, Thai wrote:
>
> Hi All,
>
> I'm learning angularjs 1.2.5 and this is what I notice:
>
> html: <button ng-click="testJAXRS()">testing jax-rs with ng-click</button>
>
> js: 
> var app = angular.module("myApp", ["ngResource"]);
> app.controller("Controller", ["$scope", "$resource", function($scope, 
> $resource) {
>     $scope.testJaxRS = 
> $resource("${pageContext.request.contextPath}/resource/test-jaxrs/something");
>
>     $scope.testJAXRS = function() {
>         var temp = $scope.testJaxRS.get(function() {
>             alert(JSON.stringify(temp));
>         });
>     };
> }]);
>
> The json string returned from the server is {"key 1":["value 1 for 
> key1","value 2 for key1"],"xyz":["abc","def","mnp","something"]}, but the 
> alert prints out {"key 1":["value 1 for key1","value 2 for 
> key1"],"xyz":["abc","def","mnp","something"],"$promise":{},"$resolved":true}. 
> Is there any way to not have the "$promise" and "$resolved" keys in the 
> variable temp?
>
> Thanks.
>

-- 
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/groups/opt_out.

Reply via email to