angularjs - Submitting form from ngFormController -


i've made own form directive <if-form form="vm.form" submit="vm.sendform()"><if-fields></if-fields></if-form> in directive have regular form <form name="vm.form">....</form> in vm.form have ngformcontroller (with $invalid, $dirty, $error , on).

i want submit form outside <if-form>. how can submit form using vm.form? want pass validation. possible?

you can use ng-click call submit function anywhere:

ng-click="vm.sendform()" 

or can associate separate submit button using form=""

  <input type="submit" value="submit" form="vmform"> 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -