Answer the question
In order to leave comments, you need to log in
RxJs: how to send request with new data?
Good time of the day!
I have this code:
contractState = this.http.get(this.apiGetAddressData.getValue().href).pipe(
repeatWhen(() => this.contractRefresh$),
switchMap((data: ContractDataModel) => {
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!',this.apiGetAddressData.getValue().href, data)
...
}),
...
Answer the question
In order to leave comments, you need to log in
exactly the opposite :)
this.contractRefresh$.pipe(
switchMap(() => this.apiGetAddressData),
switchMap(addressData => this.http.get(addressData.href)),
....
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question