1
将表单提交到Angular 2应用程序的最佳方式是什么?即从一个非角度的网站,到一个Angular应用程序?将表单提交到Angular 2应用程序
你不能简单地把应用程序的操作URL与method="GET"
为角2个使用“矩阵网址符号”,浏览器将添加表单字段作为常规PARAMS(?=,= &)。
例如这种方法行不通,假设URL是一个角2应用:
<form method="GET" action="http://myangular2app.com/search;">
<input name="q">
<input type="submit" value="Go">
</form>
浏览器将导航到一个URL像http://myangular2app.com/search;?q=mysearch
当它需要http://myangular2app.com/search;q=mysearch
(没有问号)。
对不起,但这并没有回答这个问题。 – jimbo2087
好 - 让我澄清。如果你使用表单模块,你不需要担心角度矩阵URL表示法 –