Hi all.
I am having some trouble integrating the Parse.com Javascript SDK into my project. I have looked all over for a solution but can’t find one.
I followed the instructions located in the following link: https://blog.nraboy.com/2015/04/use-parse-core-in-ionic-framework-mobile-apps/
As suggested I have included the latest parse.js file in my index.html, I have put the following code into app.js under the $ionicPlatform.ready()
method (using my appID and JSID taken from Parse): Parse.initialize("APP_ID_HERE", "JAVASCRIPT_ID_HERE");
I am also using the Parse Angular Patch https://github.com/brandid/parse-angular-patch and have followed all instructions for this. i.e. including the patch.js file in index.html and adding the code to app.js like so: angular.module('myApp', ['ngAnimate', 'parse-angular'])
I have excluded the Parse Angular Patch also to make sure it is not this causing the issue, the issue remains in the absence of the patch.
In my controller I have the following code
var query = new Parse.Query("testUser");
query.equalTo("facebookID", "10101185732529923");
query.find()
.then(function(result){
console.log(result);
});
Initially this worked and logged the data from Parse but then stopped. Every 10-20 attempts it seems to work once but otherwise gives the following error in the console:
You must specify your applicationId using Parse.initialize. <ion-nav-view name="tab-nudges" class="view-container tab-content" nav-view="active" nav-view-transition="ios">
ionic.bundle.js:20306
I don’t understand this as it is clearly specified in app.js and works sometimes. Any help would be very much appreciated.
Thanks
Ant