How to validate a form when the submit button is outside of this form, with angularJs?

后端 未结 4 1254
孤街浪徒
孤街浪徒 2021-02-08 11:47

I have a form element created with AngularJS with a submit button within it and I would like to put this button outside of this form. How can I do that with Angular and have my

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 12:34

    As I understand You try to do form wizzard. However you don't need multiple form element, Just use one form element at the top. For child form use ng-form directive to valiadate them seperately.

    You can find detailed documentation https://docs.angularjs.org/api/ng/directive/ngForm about using ng-form

    Something like this

     
    shippig fields
    delivery fields
    payment fields

提交回复
热议问题