【发布时间】:2020-06-20 22:31:15
【问题描述】:
使用 Angular 9,我需要根据返回两个 observables 的两种方法检查条件:
return zip(this.authService.isSignedIn(), this.authService.getRole()).pipe(
map(([isSignedIn, role]: [boolean, string]) => isSignedIn && role && role.toLowerCase() === 'admin')
);
但我得到了错误:
Property 'pipe' does not exist on type 'OperatorFunction<unknown, [unknown, boolean, any]>
我错过了什么?
【问题讨论】:
-
你检查过你的进口吗?你确定 zip() 参数是可观察的吗?
标签: angular rxjs observable angular9