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表示法 –