我有 2 个像这样的 observables:
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)
)
我想从 Tap 部分中的 $loaded 流中访问isLoaded
var 我该怎么做?这是更好的方法吗?