本文介绍了无法在Angular 2应用程序中提交HTML表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在我的Angular 2(beta2)应用程序中包含静态HTML表单,但是当我点击提交按钮时它什么也没有做。
我使用的HTML:
< form action =upload_pathmethod =POST> < input type =textname =text/> < button type =submit>发送< / button> < / form>如何启用我的表单以使用Angular2?
< form ngNoForm ...> class =h2_lin>解决方案
您可以阻止Angular处理表单。
I'm trying to include static HTML form inside my Angular 2 (beta2) app but it doesn't do anything when I hit the submit button.
Here's the HTML I use:
<form action="upload_path" method="POST"> <input type="text" name="text" /> <button type="submit">Send</button> </form>How can I enable my form to work with Angular2?
解决方案With
<form ngNoForm ...>you can prevent Angular from handling the form.
更多推荐
无法在Angular 2应用程序中提交HTML表单
发布评论