I have the array as below:
arr = ['res1', 'res2', 'res3'];
Then for each arr
value, I will do an API call that will return a promise
arr.forEach(val => this.getPromise(val));
The method getPromise
returns a promise.
I need to wait for all promises before i invoke another method. How should I do it?