angularjs $http.delete breaks on ie8

后端 未结 3 1806
情深已故
情深已故 2021-02-19 04:24
$http.delete(\'/api/carts/\' + productCode).
  success(function() {
    cart.products = someMethod();

    updateTotals();
  }).
  error(function() {
    console.log(\'C         


        
3条回答
  •  爱一瞬间的悲伤
    2021-02-19 05:20

    $http.delete(path) is a shortcut for DELETE requests. So as the shortcut breaks on IE8, besides calling by their uglly form: $http['delete'], you can call using the original mode:

    $http({method: 'DELETE', url: path})
    

提交回复
热议问题