Last active
January 2, 2016 18:19
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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