Start a new topic

Integrate Angular js

Hi,

I have a angular js app that connect to Kinvey.

i success connect used $kinvey.init(); in my module app.

bat when i wont to get data from dataStore i get this error "You need to be logged in to execute this request."



The app is all about Events Calendar, in index.html i will show the events ( collection " Public").



In document, can only one user by logged in how can i poll data from Kinvey with applicatino user?



Thanks, Oshri


What i need to add is that:

var promise = $kinvey.init({

appKey : *********',

appSecret : '******************'

});







promise.then(function(activeUser) {



if(null === activeUser) {

return Kinvey.User.create();

}





}, function(error) {

status.trigger('error', error);

});
Even though the collection permission may be public, make sure you are [logged in](http://devcenter.kinvey.com/angular/guides/users#login) prior to retrieving data from the DataStore.
Login or Signup to post a comment