Last post Sep 06, 2018 07:03 AM by alicanuslu
Sep 05, 2018 02:26 PM|alicanuslu|LINK
Sep 06, 2018 05:44 AM|Brando ZWZ|LINK
In my opinion, this is the right error.
If you use ng-serve to run your angular page, it will return error as below:
<pre>Cannot POST /</pre>
Since Angular is running inside of the browser when the POST requests are coming to the server. Usually your server just rewrites all (or almost all) incoming requests to your index.html and Angular by parsing the URL knows which state to show.
In other words, your POST data is received on your server but not passed through. You can catch it at the moment of rewriting and pass the data in some way (print it inside of HTML, set as cookies, etc) to your Angular app.
If I was choosing the way to pass the data I would prefer to just store the POST data in a database under some ID and then redirect the browser to the Angular app with a get parameter telling to pick the data under the specified ID.
Sep 06, 2018 07:03 AM|alicanuslu|LINK
Thanks for reply ,