mercredi 27 juillet 2016

AngularJS Google App Engine API Load Error

When a Google App Engine endpoint API is called immediately once the page is loaded, the following error is thrown. I need to wait for few seconds to call the API.

Then is same when the page is reloaded by some other means, say called from an other page etc.

I have tried adding a callback to call the API after few milliseconds $timeout(queryCallback, 100, false); The results are the same.

Is this a AngularJS error or resource load error? How to solve the error, please share your comments.

angular-1.2.16.min.js:89 TypeError: Cannot read property 'queryInfo' of undefined
  at h.$scope.queryInfoAll (controllers.js:641)
  at $scope.queryInfo (controllers.js:616)
  at angular-1.2.16.min.js:119
  at e (angular-1.2.16.min.js:37)
  at angular-1.2.16.min.js:40

controllers.js:641

gapi.client.database.queryInfo().execute(function (resp) { }

Aucun commentaire:

Enregistrer un commentaire