Angular2: how to post+redirect form with action on external site

前端 未结 2 1358
有刺的猬
有刺的猬 2021-01-05 11:56

I have a form on an Angular2 webpage.

When I hit submit on the form, I\'d like the equivalent of \" method=\"post\".....> to happen.

That is, the action scr

2条回答
  •  清酒与你
    2021-01-05 12:21

    Thanks to the angular2-forms tag which showed up as an option when I posted this, I think I have found the answer at Angular2 ngNoForm and also do angular form validation

    There is a (rather undocumented) option on ngForm "ngNoForm" which removes the automatic ngForm handling from this specific form. This gives me back the standard use of the Submit button, and gets the behaviour I need.

提交回复
热议问题