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) {

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) {
entity_index('contact', query, options);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.