Start a new topic

User Discovery Issue in Angular SDK

Following the directions for User Discovery in an Angular app here: http://devcenter.kinvey.com/angular/guides/users#lookup


I get the following error when I follow the directions exactly:

'$kinvey.UsersStore is not a constructor'


I can create, save and update users no problem. I need to find all users with a 'type' of 'vendor' and return them as a list to the current view. When I look through the Kinvey Angular SDK I don't see any reference to 'UsersStore'. I only see 'UserStore' which I tried with no luck. I've played around with a few other syntaxes and either get the above error or 'find is not a function of..'.


Here's my code:


///


var filter = new $kinvey.Query();

filter.equalTo('type', 'vendor');

  var usersStore = new $kinvey.UsersStore(); // This is where it is currently failing

  var promise = usersStore.find(filter, {

    discover: true

  });

  promise.then(function(entities) {

   vendors = entities;

   console.log('getVendors subscribe', vendors);

   deffered.resolve(vendors);

  }, function(error) {

    console.log('getVendors error', error);

   deffered.reject(error);

  });


///


Using Angular v1.5.3 and Kinvey Angular SDK v3.2.1


Jbishop,


Have you resolved it using this: $kinvey.UserStore(); ?

Thanks,
Pranav
Kinvey Support

Hi,


We have released a new version of the Kinvey Angular SDK v3.2.2 that fixes this problem. You can find the update for download at the following URL.


http://devcenter.kinvey.com/angular/downloads



Regards,

Wani

Kinvey Support

This issue has been resolved. There is currently a bug in the Kinvey Angular SDK.

Login or Signup to post a comment