【发布时间】:2017-12-09 12:55:56
【问题描述】:
我正在使用 angular2 observable 模式来发出 http 请求。 我正在尝试有条件地重复 http get:我想执行 http get 直到满足条件:
http.get('url')
.map(res => {
// if the condition is met I should repeat the http get request
})
.subscribe()
有没有办法有条件地重复http get请求?
谢谢, 马可
【问题讨论】:
-
我会说你可以为此使用递归函数
-
嗨,迈克,你能解释一下我如何使用 observable 来做到这一点吗?
标签: angular http get rxjs observable