Q
Q
Quber2014-11-25 05:21:46
JavaScript
Quber, 2014-11-25 05:21:46

Why does the $http.patch() function throw an "undefined is not a function" error in AngularJS?

Connected AngularJS. I use the method:
$http.patch(url, data);
In the console it gives out
undefined is not a function
On stackoverflow it is written that the $http service does not have such a method as patch. But according to the documentation it is.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Philipp, 2014-11-25
@Quber

Shortcut $http.patch is implemented in version 1.3.4.
Pay attention to this method https://github.com/angular/angular.js/blob/master/...

S
Sergey Romanov, 2014-11-25
@Serhioromano

Try like this
$http({method:"PATCH", url: "my/url"})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question