其他第三方系统传递参数到angular

来源:3-4 路由动画及高阶动画函数

慕粉1627455901

2017-12-13

我有一个第三方系统,它通过? &的方式传递多个参数到angular,请问angular如何接受第三方传递的这种参数值,我通过this.routeinfo相关实现获取参数值是undefined,如何解决啊。

写回答

1回答

接灰的电子产品

2017-12-13

用下面方式获取路由参数

constructor(private route: ActivatedRoute>) {
    this.projectId$ = this.route.paramMap.map(p => <string>p.get('id'));
}


0
3
慕粉1627455901
回复
接灰的电子产品
这样就可以了: this.routeinfo.queryParamMap.map(p => p.get('openid')).subscribe(o=>{ this.openid=o; console.log(this.openid);
2017-12-14
共3条回复

Angular打造企业级协作平台,让你在Angular领域中出类拔萃

全网首个介绍官方 Material 组件库用法与 Redux 在 Angular 中的应用

998 学习 · 536 问题

查看课程