Skip to content
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
@tkremmel

Description

@tkremmel

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions