I have the functionality to send the request from frontend to backend continuosly. so I added the code as given below.
I want to implement in way that the first request should go immediately and then after two minutes.
but with below code and as per definition of interval, it will send the first request after two min.
this.getData = Observable.interval(2 * 60 * 1000)
.pipe(flatMap(() => this.service.getData(b, b, b, b, b, b))).subscribe();
I dont want to repeat the code by adding a request first and then adding the above code, any other way to accomplish it.