How to- submit html form using template table

You can use ng-model and ng-submit.

<h1>Heading</h1>
<form ng-submit="send({payload: mymodel})">
<TABLE BORDER="1">
    <TR>
        <TD>Name</TD>
        <TD ALIGN="left"><INPUT TYPE="text" SIZE="25" NAME="fname">
        </TD>
    </TR>
    <TR>
        <TD>Phone Number</TD>
        <TD ALIGN="left"><INPUT ng-model="mymodel.number" TYPE="text" SIZE="25" NAME="phnnum">
        </TD>
    </TR>
         <TR>
    <TD class = "select">Chose Vehicle         
    </TD>   
    <TD ALIGN="center">
       <select ng-model="mymodel.select" >        
            <option value="volvo">Volvo</option>
            <option value="saab">Saab</option>
            <option value="mercedes">Mercedes</option>
            <option value="audi">Audi</option>
       </select>
    </TD>        
</TR>
<TR>
<TD><INPUT TYPE="submit" VALUE="Submit"></TD>
<TD><INPUT TYPE="reset" VALUE="Clear"></TD>
</TR>
</TABLE>
</form>

*note not all directives are implemented.

[edit] Removed html and body tags as the dashboard would have already added them

1 Like