关于angular2路由中的单页面开发问题

来源:互联网 发布:儿童故事书软件 编辑:程序博客网 时间:2024/06/04 04:15

在实际的开发过程中,遇到了一个调用第三支付的时候遇到的一个问题,

问题描述:
第三方支付需要从新开启一个页面,提交方式需要用到form提交:
代码修改如下:app.component.html

<router-outlet></router-outlet><div style="display:none"><form id="forms" method="post" target="_blank" novalidate>    <input id="signature" name="signature" type="text">    <input id="message" name="message" type="text"></form></div>

调用的页面
top.component.ts

  //调用第三支付页面          $("#forms").attr("action",data.data.action);          $("#message").val(data.data.message);          $("#signature").val(data.data.signature)          $("#forms").submit();
原创粉丝点击