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