I'm trying to insert 2 pipe operators into pipe function, but I want to apply the first one by condition, else, only the second one will be applied.
that's the way it looks now without the condition:
getData(query).pipe(setLoding(this.store),tap(//some actions here...))
setLoading is an Akita pipe, and I would like it to be applied with some boolean condition.
I tried to use rxjs's iif()
but I received an error since setLoding
is not a type of SubscribableOrPromise
.
Can anyone think of another way?