This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Resource.get xhr is not executed when updating to Angular 1.1.4 #2438
Closed
Description
The code below works fine in 1.1.3, but does nothing in 1.1.4. It only prints "after get" and it seems as the get branch is never entered. From the debugging console I can see that no xhr request is issued.
app.factory('gridData', function($resource) {
var csrf = 'CSRFTOKENEXAMPLE';
return $resource('/list-management/rest/list/items/1/:itemID', {itemID:'@id'},{
get: {method:'GET'},
query: {method:'GET', isArray:true},
save:{method:'POST', headers: {'X-CSRFToken' : csrf }},
});
});
gridData.get({itemID:item.id}, function(result) {
//request ok
console.log("in get status ok");
dataView.updateItem(result.id, result);
dataView.refresh();
}, function(response) {
//404 or bad
console.log("bad request");
if(response.status === 404) {
}
});
console.log("after get");
Metadata
Metadata
Assignees
Labels
No labels