AngularJS: Call the ng-submit event outside the form

前端 未结 10 1495
渐次进展
渐次进展 2020-12-09 02:07

I\'m a fish in AngularJS and I have this scenario.

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 02:12

    If you are looking a handle of submitted state of form: In function ng-click just add vm.formName.$setSubmitted();

    ng-click="vm.formName.$setSubmitted(); vm.submit()"
    

提交回复
热议问题