Currently in the process of validating a form with a function called "myFunction".
<button class="btn btn-lg btn-primary btn-block" type="submit" ng-click='form.$valid && myFunction()'>SEND</button>
The function should only run when the button is clicked and the form is valid, meaning when:
Form.$valid == true.
Additionally, there is another function named "directive_function()" that needs to be executed every time the button is clicked, but it should only run if the condition is met.
I have the requirement to implement this directly in the HTML view without any interference with the controller. How can I achieve this?
This is roughly what I am looking for:
ng-click='directive_function(); form.$valid && myFunction()'