javascript - AngularJS get post response -
i have 1 angularjs project. using front end end, , have java web application end. angularjs project, redirecting url outside of applications(both java , angularjs). site, processing request , returning angularjs application, info post.
my java application runs on
http://localhost:8080/myjavaapp
angularjs app runs on
http://localhost:8080/myangularapp
from angularjs app, redirecting url
http://someotherwebsite.com/somepage?someparam=somevalue
after processing request sends angularjs project.
http://localhost:8080/myangularapp/#/responsepage
but sending post. , want request parameter in angularjs application. when homecoming angularjs page, shows error
cannot post /
if used jsp page, request parameter like
string responsestring = (string) request.getparameter("response");
but html , js controlers in angularjs project. possible send post? if so, how can post parameter in js controller?
edit
from other site if it's redirecting like
http://localhost:8080/myangularapp/#/responsepage?response=somevalue
then it's request, , can value of response using $routeparams
. it's $http.get("someurl?response=value")
but in usecase, sending post request. $http.post("someurl")
. parameters post , not able value. how can it?
thanks.
it sounds you're trying utilize angular browser application server application. can't java application talk other application? other application back upwards jsonp? if there payload can send ng app , response back. afaik can't post browser, architecture sounds wrong. there many question reply question couldn't set in comment. utilize this:
$http.jsonp('http://someotherwebsite.com/somepage?someparam=somevalue');
you not post server you're using (querystring) , give other apps payload.
hope helps
javascript angularjs
No comments:
Post a Comment