angularjs - spring boot html redirect -
i using angularjs along spring boot.
in restcontroller, passing in json object. end goal invoke new html.
@requestmapping(value="loadpatientdetails", method=requestmethod.post) public string loadpatientdetails(model model, @requestbody info patientinfo){ system.out.println("inside loadpatientdetails "+patientinfo.getid()); model.addattribute("json", new gson().tojson(patientinfo)); return "html2"; }
my angularjs calling code following:
function (patientid){ return $http({ method : 'post', url : '/loadpatientdetails', data : patientid, headers: {'content-type': 'application/json; charset=utf-8'} }).then( function(status){ return status; });; };
problem: getting complete html i.e. html2 in response.. need html2 should automatically rendered.
what missing?
Comments
Post a Comment