根据订阅处理2个?角
我有一个与此代码的组成部分,
this.service().subscribe((result) => { this.service2(result).subscribe((result2) => //other code }}
我正在使用Angular进行良好的实践,这似乎不是这种代码的好方法。但不确定如何改善这一点。
有建议吗?
I have a component with this code
this.service().subscribe((result) => { this.service2(result).subscribe((result2) => //other code }}
I'm applying good practices in Angular and seems this is not a good approach for this kind of code. But not sure how to improve this.
any suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
switchmap
操作员:Use
switchMap
operator: