Is there a way to put a condition inside an ng-click? Here, I want that the form is not submitted if there are any form errors, but then I got a parse exception.
If you do have to do it this way, here's a few ways of doing it:
By far the easiest solution.
Might be OK if you're showing/hiding some complex markup.
Sorry! We need all form fields properly filled out to continue.
(remember, there's no ng-else ...)
Communicating to the user where the button is (he won't look for it any longer), but explain why it can't be clicked.
Sorry! We need all form fields properly filled out to continue.