How to subscribe all Observers in once like Promise.all?


#1

In ng2-translate, I need to subscribe few observer in a same method, I am wondering can I subscribe all observers in once like Promise.all?

Example: my current code

  this.translate.get("test1").subscribe(res => {
      alert("Result: " + res);
    });
    
    this.translate.get("test2").subscribe(res => {
      alert("Result: " + res);
    });

My ideal code is

var var1 = this.translate.get("test1");
var var2 = this.translate.get("test2");

SubscribeAll(var1,var2) ({res1,res2} => .....

#2

me too need this solution now…i remember i saw it elsewhere but i cant find it after that


#3

forkJoin.