我想在提交表单时将操作页面加载到ionic组件中, 现在,当我提交表单时,它会带我进入操作网址
我正在使用离子3和角4
我的表单代码:
<ion-row>
<form #f method="post" action="https://my.url.com">
<input type="hidden" name="clientid" [(ngModel)]="clientid" />
<input type="hidden" name="trantype" [(ngModel)]="trantype" />
<input type="hidden" name="amount" [(ngModel)]="amount" />
</form>
</ion-row>
我的提交功能:
submit(form){
let data = {
"clientid": form.clientid.value,
"trantype": form.trantype.value,
"amount": form.amount.value,
}
this.paiementService.getHash(data, this.token).subscribe(
data => {
form.hash.value = data;
form.submit();
},
err => {
console.log(err);
});
}