jdrupal entity_index success function not called I have an ionic 1 app with jdrupal. In a controller i query a remote api with this code:

// If logged in:
console.log('Hello ' + Drupal.user.name);

// Get the Contacts list.
var query = '';
var options = {
   'service': 'rest/basic',
   'resource': 'contact'
};

console.log('before entity_index');

entity_index('contact', query, options, {
   success: function (result) {
      console.log(result);
   }
});


the success function is never called. With Drupal.settings.debug = true; i can see the result is returned from the server. Status is 200, response contain my array of objects, but no success function call. 

If someone has an idea?

thx,
david
According to its source code, success should be part of the options

options.success = function(result) {
    console.log(result);
}
entity_index('contact', query, options);