我在 Ion-content 中有一个表单,我想通过放置在 Ion-footer 中的按钮提交该表单,并进行所有表单验证。 http://play.ionic.io/app/07e251b1e926 处的代码结构,
但是没有触发提交事件,有人做过吗?
最佳答案
试试这个,在表单外添加标签作为按钮,并在表单内添加隐藏按钮。
<form name="myform" ng-submit="submitmyform()" >
<input type="submit" id="submit" value="Submit" style="display:none"/>
然后页脚标签给 for
属性设置表单中的 button
id
<a href="#"><label style="width:100%;heigh:30px;background-color:red" for="submit">Submit</label></a>
还应该在表单之外包含 Controller [formController
]。
关于angularjs - 如何使用 ion-footer 提交按钮提交 ionic 表单?我正在尝试这个 http ://play. ionic.io/app/07e251b1e926,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38711509/