Thursday, 24 August 2017

angularjs - Options is coming instead of put

This is the front-end part



$scope.result = {};

$scope.edit = function() {
console.log($scope.result); //This is working
$http.put('http://localhost:4000/customer/' + $routeParams.id, $scope.result)
.then(function(data) {
$scope.result = data;

console.log("posted successfully") //This is not working
})
.catch(function(err) {
console.log(err);
});
}


Catching at .catch every time

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...