I have two functions:
this.geQuizStorage();
this.getQuizData();
geQuizStorage() {
this.quizStorage.getAnswers().then(data => {
return data;
});
}
getQuizData() {
this.quizData.getQuiz().then(data => {
return data;
});
}
I am trying use promises for the 2 functions and wait until both are done, something like:
http.when(this.geQuizStorage(), this.getQuizData()).when(data => {
// data[0] first function response
// data[1]
})
any ideas how to do this in Ionic 2 / Angular 2