Take the 2-minute tour ×

How do I connect a AngularJS app to a Kinvey backend in an easy way?

share|improve this question
This question is a little generic. Can you be more specific? Which APIs, what use case, etc. –  Josh David Miller Mar 6 '13 at 18:13
Ahh sorry. I don't mind if it's the REST API or javascript library to be honest. Whichever is easier. For use cases, I'm thinking general use, fetching and saving data, user management. –  Alfred May 7 '13 at 15:40
add comment

4 Answers

up vote 1 down vote accepted

A bit late to the conversation, but I have created a library for AngularJS that provides full support to Kinvey using the REST API.


share|improve this answer
add comment

Disclaimer: I work at Kinvey.

I have been working on an app that uses angular in my free time, you can see the source to the services I have created that communicate with Kinvey. https://github.com/InnCrisis/InnCrisis/blob/master/public/coffeescripts/adminServices.coffee

A small snippet of javascript to handle the registration of a new user in Kinvey.

register = function(username, password, name) {
  var deferred = $q.defer();
  new Kinvey.User.create({
    username: username,
    password: password,
    name: name
  }, {
    success: function(user) {
      $rootScope.$apply(null, function() {
    error: function(e) {
      $rootScope.$apply(null, function() {
  return deferred.promise;

Since the Kinvey javascript API will make changes that are not tracked by angular you need to do a $scope.$apply of the results.

share|improve this answer
Consider using plain JS - it would help more people. Why use something that only helps a sub-domain of JS users? –  Alan Klement May 29 '13 at 15:42
Thanks Alan, I just updated the example to be Javascript instead of Coffeescript. –  Ryan May 30 '13 at 18:14
add comment

Based on a quick tour of their site, it seems Kinvey has a RESTful API, which makes things fairly straightforward. Going cross-domain, you'll need to find out if the Kinvey server is CORS compliant (returns appropriate headers allowing for cross-domain access) or if not, you'll need to use Angular's $http.jsonp to GET the data (jsonp only supports GET).

share|improve this answer
add comment

Your Answer


