【发布时间】:2020-09-01 10:30:50
【问题描述】:
我有 2 个端点:
- 1 个端点可让当前用户登录。
- 1 个端点获取此用户的授权。
其实我用的是:
this.user
.subscribe((e) => {
this.grants.get(e)
.subscribe((x) => {
console.log(x)
})
})
但这是 Angular 2+/RxJS 的反模式。
我想知道如何按照 Angular/RxJS 最佳实践来做到这一点。
谢谢
【问题讨论】: