I have tried a while, but still could not figure out how to implement the following with RxJS.
Here is one click event : MainMethod()
In this MainMethod()
I first need to call API endpoint to get the Data : reponseData from GetResponseDataMethod()
GetResponseDataMethod(){
this.service.getResponse(input).subscribe(result => {return result.Data;})
}
this GetResponseDataMethod() is working fine. and I can get the data.
Then in the MainMethod() I need to get response from this GetResponseDataMethod() then Passing it to another child component. But It always open this component, then only go through this GetResponseDataMethod().
Basically I got undefined, for the API response data I need to use.
MainMethod(){
var responseData = GetResponseDataMethod();
this.dialog.open(ChildComponent, {data : {responseDataParameter: responseData}})
}
How can I implement this using RxJS, please help?
Thank you so much!