I have a nested promises as follows. I am just writing the pseudo code to reflect my use case.
$scope.result="";
Promise1.then(function1(value1){
Promise2.then(function2(value2) {
forloop() {
Promise3.then(function3(value3){
$scope.result += value3;
}//end of function3
}//end of forloop
}//end of function2
}//end of function1.
How can I get the value of "result" outside of the Promise1. Can you please guide me on this in order to get the value of "result" so that I can use it as part of another code which is after executing those promises.
Thank you all
regards sivakiran B