I have component where I call service function
**xyz.component.ts**
let limitCrossed = this.outgoingPaymentsMultipleService.checkMultipleApproveLimit(selectedPayments);
let param: DialogConfirmCallerConfig = {
confirmationNeeded: **limitCrossed != null,** // I need to use return data here
data: {limitFailed: {account:"user",duration:"payment"}}
};
In service file xyz.service.ts
checkMultipleApproveLimit(payments){
combineLatest([currencyConversion$, userPaymentsLimit$]).subscribe(([c, l]) => {
const limitFailed = this.isPaymentsLimitCrossed(paymentsLimitsCheck, c, l)
return limitFailed;
})
isPaymentsLimitCrossed(paymentsLimitsCheck, currencyConversionRates, limits){
// some calculation and base on that returning object
return {o : true };
}
in component how to wait to use limitCrossed