我在java后台的controller中获取了数据库的数据,想在前台通过angularjs解析controller中的方法如下:@Controller@RequestMapping("/KindlePocket")public class KindlePocketController { @RequestMapping("/details") @ResponseBody public ModelAndView toSearchDetailPage(@RequestParam("idList")String idList, HttpServletResponse response) { if(logger.isInfoEnabled()){ logger.info("redirecting to details page..."); } Map<String, Object> queryMap = new HashMap<String, Object>(); queryMap.put("key","id"); queryMap.put("value",idList); JsonNode result = this.searchService.search(queryMap); if(logger.isInfoEnabled()){ logger.info("query single result:" + result.toString()); } ModelAndView model = new ModelAndView("details"); model.addObject("result",result); return model; }}页面是html的,没有使用jsp。现在页面能够跳转到details.html这里,但是angular如何去获取数据并解析ModelAndView中的result数据呢?这个请求不是通过angular发出的。谢谢大家。
添加回答
举报
0/150
提交
取消