1.

Write a syntax to send sample HTTP POST request in AngualrJS?

Answer»

To PERFORM any AJAX calls, AngularJS makes USE of the $http service. The syntax is as below:

$http({ METHOD: "POST", url: "URL", data: JSON.stringify(VALUE), contentType: 'application/json' }).then(function (successResponse) { // success callback action of the request },function (errorResponse) { // error callback action of the request });


Discussion

No Comment Found