I have created an angularjs application which uses $resource, here UserType.customDelete factory. after executing the server will return either [{"0":"T"}]
or [{"0":"F"}]
, The application is working fine in all browser except IE8, in IE8 i am getting [{}]
, but in all other browser even in IE9 i am getting [{"0":"T"}]
can anyone please give me some solution for this
UserType.customDelete({
uid : user.uid,
action : 'remove'
}, function(data)
{
console.log(JSON.stringify(data));
if(data[0][0] === "T")
{
console.log('success');
}
else
{
console.log('failure');
}
}, function(error) {
});
modals.js
angular.module('users', ['ngResource'])
.constant('OPTIONS',
{
query:
{
method: 'GET',
isArray: true
},
customDelete:
{
method: 'POST',
isArray: true
}
})
.factory('UserType', function($resource, OPTIONS)
{
return $resource('rest/users/:uid/:action',
{
uid: "@uid",
action: "@action"
}, OPTIONS);
});