Skip to content

Instantly share code, notes, and snippets.

@vseventer
Last active January 2, 2016 18:19
Show Gist options
  • Save vseventer/8342583 to your computer and use it in GitHub Desktop.
Save vseventer/8342583 to your computer and use it in GitHub Desktop.
The old way of defining an AngularJS controller which uses $kinvey. Note $scope.$apply() is required.
app.controller('DataCtrl', ['$scope', '$kinvey', function($scope, $kinvey) {
$kinvey.DataStore.get('collection-name', 'entity-id').then(function(entity) {
$scope.entity = entity;
$scope.$apply();
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment