User283571144 posted
Hi alicanuslu,
In my opinion, this is the right error.
If you use ng-serve to run your angular page, it will return error as below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /</pre>
</body>
</html>
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.
Best Regards,
Brando