Angular 5-读取从另一个站点发布的表单数据

时间:2018-07-19 15:28:53

标签: angular identityserver4

第三方站点进行身份验证,并将用户重定向到我的Angular 5站点。重定向用户时,它将表单数据(id令牌)发布到以Angular 5编写的我的网站,在这里我必须阅读发布的表单数据并继续。

您能说明一下我可以在Angular 5中收集发布的表单数据的地方吗?

注意:第三方站点使用Identity Server 4进行一次密码验证。

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

尝试类似的方法:

example

private FormData:any;
  constructor(private route: ActivatedRoute) {
  this.getPostedData();
  }

  getPostedData() {
    this.route.queryParamMap.subscribe(resp => {
      console.log(resp)
    this.FormData = resp.get('form');
    console.log(this.FormData);
    })
  }
相关问题