Set the following header in your Angular, It should work
.config(function ($httpProvider) {
$httpProvider.defaults.headers.common = {};
$httpProvider.defaults.headers.post = { 'Content-Type': 'application/json' };
$httpProvider.defaults.headers.put = { 'Content-Type': 'application/json' };
$httpProvider.defaults.headers.patch = {};
})
manpreet
Best Answer
2 years ago
I am to send a user entered text through Angular js to Node js the issue is the node js server recognizes the event but does not get the data and print it I know I am doing some mistake in the code and do not know how to fix it. can some one please fix this code please.
angular.js
Server.js