angularjs - 如何使用 ion-footer 提交按钮提交 ionic 表单?我正在尝试这个 http ://play. ionic.io/app/07e251b1e926

标签 angularjs ionic-framework hybrid-mobile-app

我在 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]。

http://play.ionic.io/app/0e22c14ea697

关于angularjs - 如何使用 ion-footer 提交按钮提交 ionic 表单?我正在尝试这个 http ://play. ionic.io/app/07e251b1e926,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38711509/

相关文章:

ios - iOS“默认” UIWebView/WebKit上的WebAudio支持

angularjs - 如何在 Angular.js 中使用 `$window.history.back()` 返回?

javascript - 无法从指令中的模板编译 ng-repeat

javascript - AngularJS 指令 : compile template and watch scope

javascript - 如何在 AngularJs 中删除点击事件的元素焦点

javascript - 删除搜索栏中的搜索词时,搜索功能不起作用

flutter - Getx Flutter - 更新列表中的项目不是 react 性的

android - 我可以用 Bootstrap css 替换 Ionic CSS 吗?

ionic-framework - ionic - 按下按钮后显示微调器

ios - 将插件添加到 Phonegap (3.1.0) Cleaver 应用程序无法正常工作