我将弹簧控制器定义为
@Controller
public class TestController {
private Logger logger = LoggerFactory.getLogger(getClass());
@RequestMapping(value="/hello")
public String home(HttpServletRequest httpRequest, Model model) {
model.addAttribute("Authorization", "test string");
return "/index";
}
}
有没有办法在angularjs控制器中获得属性“授权”?
最佳答案 试试这个:
($location.search()).授权
有关$location和参数的更多详细信息:https://docs.angularjs.org/api/ng/service/ $location