小编mik*_*ike的帖子

如何在HttpClient"get"方法中传递URLSearchParams - Angular 5

我使用Angular 4.2Http服务,我使用了这样的get方法,其中params是一个URLSearchParams对象:

this.http.get(url, {headers: this.setHeaders(), search: params})
Run Code Online (Sandbox Code Playgroud)

我想迁移到Angular 5.http现在是一个像角度团队推荐的HttpClient对象.我的'搜索'键出错了.

你知道如何在我的案例中将Http迁移到HttpClient服务吗?

谢谢.

http httpclient angular angular5

20
推荐指数
2
解决办法
4万
查看次数

Angular 5 / Google Map - “ReferenceError: google is not defined”

我使用一种类型的 Angular 5:“@types/markerclustererplus”:“2.1.28”。这种类型安装@types/google-maps。

我在“index.html”文件中添加了脚本部分来加载地图。在我的组件中,我可以使用 google 命名空间。这工作正常。

但是,当我运行测试时......它失败了!我收到“ReferenceError: google is not defined”

我尝试了很多东西......如果你有任何想法,我接受!

谢谢你。

google-maps undefined markerclusterer angular

2
推荐指数
1
解决办法
3497
查看次数