I am not sure what is wrong with this but somehow not able to read correct value of $scope.
Here is my code at controller -->
$scope.verifyMobile = SearchFactory.verify.query({uuid: uuid});
The JSON returned by rest service is -->
verifyNumber -- > {"id":1,"uuid":"2222","phoneNumber":"782941768355"}
I convert the POJO to JSON using gson.toString(verifyNumber Java class);
But when I try to check the value of phonenumber after making service call at controller, it always comes as undefined. can anybody please help. when I hardcode the value to returned JSON, it works fine but not with service.
alert(JSON.stringify($scope.verifyMobile).uuid);