My problem is that this submit has to be in the of the page. I need this submit to be in the . Is there a way to make the click on the submit to execute the form validation and to sbmit the form if every is all right ?
Maybe a little different aproach, but when I have forms and use validation, I disable submit button until the form is valid. This is easiley done by adding ng-disabled to your button, something like this
ng-disabled="form_poLine.$invalid"
once the form is valid the button will become enabled, then you don’t need to run custom validation in your controller. Check Angular forms https://docs.angularjs.org/guide/forms (Custom validation) to how to setup your validation in your inputs.
This would be great, except that $invalid doesn’t work if its outside of the tag. So can’t go in the header. . . This would be a great feature because almost all apps have the save button in the upper right.