I want to get the selected option in this form from the other side when clicking link.
<form (ngSubmit)="onSubmit(x)">
<input type="radio" id="radioset3" name="radioset" [checked]="x==0">
<input type="radio" id="radioset2" name="radioset" >
<input type="radio" id="radioset1" name="radioset" >
<a href="javascript:void(0)" class="flightdetails"><span><i class="fa fa-suitcase" aria-hidden="true"></i></span> Flight Details</a>
</form>
UPDATE
Css styled button did my job. I'm not good with css. That's why I was thinking about a
tag.
答案 0 :(得分:3)
可以使用(click)="..."
处理程序提交表单
<a (click)="myFormSubmitHandler()" href="javascript:void(0)" class="flightdetails"><span><i class="fa fa-suitcase" aria-hidden="true"></i></span> Flight Details</a>
在点击处理程序中,使用Http
或HttpClient
模块向服务器发送帖子请求。