I have a method that should wait for the observable to complete. I know that observables are great for returning individual pieces of data over time, but I need to know when this observable has completed the return of all its data, so I can run the verification code on the object it returns.
The getCustom method subscribes to the observed mileage on the attached url, which then returns the observed.
I'm not too sure that this is the best way to get closer to this situation, so I would appreciate it if anyone could give me any advice or guidance to deal with this.
private validateQuoteRetrievalAnswers(reference: string) {
this.riskManager.getRiskFromServer(reference);
if (this.riskManager.risk) {
}
}
getRiskFromServer(quoteReference: string) {
this.riskService.getCustom("Url").subscribe => {
});
}
user4129529
source
share