I have 2 observables like this:
return this.loaded$.pipe(
switchMap((isLoaded: boolean) => {
if (!isLoaded) {
return this.userId$;
}
}),
tap((userId: string) => {
this.store.dispatch(new MyPostsList(userId))
}),
filter((value: any) => value),
take(1)
)
I want to have access to isLoaded
var from $loaded stream inside tap part how can I do it?
Is it some better way to do this?