I am bulding my project in Ionic2 using Firebase and Angularfire2. In a method I want to wait for multiple Promise to return. So I am using following approch.
deleteAll(param: string[]) {
return Promise.all([
this.storage.remove(param[0]),
this.storage.remove(param[1]),
this.storage.remove(param[2])
]);
But in my case the number of values in param array is not fixed. If i try to use for loop in side method Promise.all
its throughing error.
Please help me resolve this scenario.