In my angular application i have to return the resolve form a the function callback.
Sample code:
new testPromise=new Promise((resolve,reject)=>{
abc("test",successCallback,errorCallback)
});
How can i call the resolve/reject from the callback functions
such as:
successCallback(data){
resolve(data);
}
errorCallback(error){
reject(error);
}
Is this possible or will i have to call the resolve/reject from inside the promise only?