Angular 5 ActivatedRoute和FlatMap

时间:2018-04-10 13:54:09

标签: angular

我正在尝试根据没有嵌套.subscribes的查询参数发出http请求。

this.activeRoute.queryParamMap
.map((params: ParamMap) => params.get('query'))
.flatMap(query => this.httpService.getWeatherForecast(query))
.subscribe( .......)

但是,我收到以下错误

this.activeRoute.queryParamMap.map is not a function

0 个答案:

没有答案
相关问题