$resource in angularjs 1.3 vs 1.4 in IE 11

119 views
Skip to first unread message

Rick Schumeyer

unread,
Sep 2, 2015, 11:55:35 AM9/2/15
to AngularJS
I have some angular code using $resource.remove that works fine in all browsers in both angular 1.3 and 1.4, and it works in IE 11 with angular 1.3 but not 1.4.

My question is, have I run into a bug in 1.4, or am I doing something incorrect?

The following call the Supervisors REST resource and deletes a Supervisor.

angular.module('testApp', ['ngResource'])
  .controller('myController', ['$scope', '$resource', function($scope, $resource) {
 
 var Supervisor = $resource('/api/supervisors/:id',{id: '@id'});
 
 $scope.doDelete = function() {
 console.log('delete');
 Supervisor.remove({id: 12});
 };
 
  }]);

IE 11 with angular 1.3.12 produces this HTTP request (which is successful): (notice the content-length)

Accept: application/json, text/plain, */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: localhost:8080
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=e76ba4dbd3a9d1d8f3308beff627

IE 11 with angular 1.4.5 produces this HTTP request (which results in HTTP/1.1 400 Bad Request):  (now content-length is 9)

Accept: application/json, text/plain, */*
Accept-Language: en-US
Content-Type: text/plain;charset=UTF-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Connection: Keep-Alive
Content-Length: 9
DNT: 1
Host: localhost:8080
Pragma: no-cache
Cookie: JSESSIONID=e76ba4dbd3a9d1d8f3308beff627

undefined




Rick Schumeyer

unread,
Sep 2, 2015, 2:56:33 PM9/2/15
to AngularJS
I added a plunk that demonstrates this at: 


For example, if you view the plunk in firefox vs ie, and then examine the request, you can see the difference.

Lee Boynton

unread,
Sep 7, 2015, 4:52:12 AM9/7/15
to AngularJS
This looks like a bug to me (I can reproduce it too). Have you filed a bug?

Lee Boynton

unread,
Sep 7, 2015, 5:53:21 AM9/7/15
to AngularJS
Reply all
Reply to author
Forward
0 new messages