I am trying to use Parse sdk with angularjs and I am a bit confused on handling promises when using implementation of promises in parse and angular.js
Parse promise provides a method fail to catch error where as angularjs provides us with catch. So say if I am inside Parse promise object and have to return say angularjs promise from it or vice versa. It won't have I guess fail method in it
ParsePromise().then(function(){
return angularPromise();
}).fail(function (error){
});
AngularPromise().then(function(){
return ParsePromise();
}).catch(function (error){
});
What should I do in such scenario?
I will suggest to use $q. Just wrap parse promises in angular's $q promises. then use only angularjs promise handling.