I want to write below jquery code in angular2. How can I do that?
$.when($.ajax("url"), $.ajax("/url2"))
.then(myFunc, myFailure);
and
$.when( $.ajax("/req1"), $.ajax("/req2"), $.ajax("/req3") ).then(function(resp1, resp2, resp3){
// plot graph using data from resp1, resp2 & resp3
});