As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I'm having trouble with the code snippet from the blog announcement on the Angular library (http://www.kinvey.com/blog/3541/kinvey-javascript-library-now-available-for-angularjs-web-apps).
The code I am using is:
The error is:
Method not implemented: Kinvey.Persistence.Net.encode
Yes, I am able to reproduce, this is a bug. The code below will work correctly:
```
var myApp = angular.module('MyApp', ['kinvey']);
var $injector = angular.injector(['ng', 'kinvey']);
$injector.invoke(['$kinvey', function($kinvey) {
$kinvey.init({
appKey : 'App Key',
appSecret : 'App Secret'
}).then(function() {
angular.bootstrap(document, ['MyApp']);
});
}]);
```
Thanks for noticing!
D
Dave Ackerman
said
over 9 years ago
Hi Mark.
The code you posted doesn't work for me either. I'm using the code you posted below, with a simple "app.js" that looks like this:
```
angular.module('MyApp')
.run(function ($kinvey) {
// $rootScope.build = '1.2';
console.log('i ran');
})
```
```
var jelly = angular.module('MyApp', ['kinvey']);
var $injector = angular.injector(['ng', 'kinvey']);
$injector.invoke(function($kinvey) {
$kinvey.init({
appKey : 'kid_TVxvWekpKi',
appSecret : '051f45d70e964e3a8a0cef8a9389e704'
}).then(function(response) {
console.log(response);
angular.bootstrap(document, ['MyApp']);
});
});
```
I get the "i ran", but the response from kinvey in the bootstrap is null.
M
Mark
said
over 9 years ago
The response can be `null`, that’s perfectly valid and will occur when you are not logged in. You might also want to add a second callback to catch init failures:
Paul M
I'm having trouble with the code snippet from the blog announcement on the Angular library (http://www.kinvey.com/blog/3541/kinvey-javascript-library-now-available-for-angularjs-web-apps).
The code I am using is:
The error is:
Method not implemented: Kinvey.Persistence.Net.encode
Any ideas?
Thanks
Paul