ng-click angularjs

Seven price
Seven price used Ask the Experts™
on
I have a button in asp.net web forms
<button ng-click="formsubmitfunction();">submit</button>

this button submits a javacript function to do a http post. The problem i am having is i am not using ng-click="submitted=true" so the form submits anyway without checking validations. any suggestions.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Manager / Solutions Architect
Commented:
How are you validating your form?

If you return false from your ng-click function, the default submit behavior is cancelled.
Like this you can do your validations and trigger the submit yourself if everything is fine.
Seven priceFull Stack

Author

Commented:
tks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial