Skip to content

Instantly share code, notes, and snippets.

@dmackerman
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmackerman/9621262 to your computer and use it in GitHub Desktop.
Save dmackerman/9621262 to your computer and use it in GitHub Desktop.
// doesn't bootstrap. no response from $kinvey.init()
<script>
var KINVEY_DEBUG = true;
var jelly = angular.module('jelly', ['kinvey']);
var $injector = angular.injector(['ng', 'kinvey']);
$injector.invoke(function($kinvey) {
$kinvey.init({
appKey : 'xxx',
appSecret : 'xxx'
}).then(function(response) {
console.log(response); // null
angular.bootstrap(document, ['jelly']);
});
});
</script>
// this actually boostraps the app, but the $kinvey.init() doesn't get called.
<script>
var $injector = angular.injector(['ng', 'kinvey']);
$injector.invoke(function($kinvey) {
$kinvey.init({
appKey : 'kid_TVxvWekpKi',
appSecret : '051f45d70e964e3a8a0cef8a9389e704'
}).then(function(response) {
angular.bootstrap(document, ['jelly']);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment