Trying to send get boolean value from spring restcontroller using $resource service of angular js ,but getting nothing in response of $resource.get.Is there anythingextra i need to add on my client side or server side for getting boolean resource. Below is my code for rest controller and $resource Rest controller -
@RequestMapping(value="validate/company/{companyName}",method=RequestMethod.GET,produces={"application/json"})
public Boolean validateCouponCode(@PathVariable("companyName") String companyName){
return companyService.exists(companyName, Column.SITE_NAME);
}
$resourse of Angular js -
function validateCompanyFn(companyName)
return $resource("admin/rest/company/validate/company/:companyName")
.get({companyName:companyName}).$promise
}
What i am doing wrong? please suggest, if there is another way of getting boolean response using $resource, and without using any extra object on server side