I have come across a method to avoid page refresh after form submission i.e event.preventDefault();
Being very new to Angular I really don't know how to put this syntax in my Angular controller, Is "event" an Angular service? How to use it in the code?
Any help would be appreciated!
On every angular user interface events like ng-keyup
ng-click
etc you have access to $event object. f.ex ng-click="myClickHandler($event, otherData)
. you can call preventDefault on that $event object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With